Root password reset

smartkiosk

New Member
Sep 9, 2009
3
0
1
Hi, as a testament to how good and stable proxmox is, I have an install of v1.3 with a unix server running on it, that has not been down for ages. In fact soo long that I have now forgotten the admin login.

Is there any way I can reset the admin login, as I cannot access the box at present

Thanks
 
if you've got physical access, you could do it the classic way:
* reboot with init=/bin/bash
* mount root fs rw
* passwd

of course, this ruins your uptime...
 
Could someone please give more exact details on how to do this?

if you've got physical access, you could do it the classic way:
* reboot with init=/bin/bash
* mount root fs rw
* passwd

I'm not sure how to "reboot with init=/bin/bash", but if I could get that far, I think I can get the remainder. I can't remember my root password for a ProxMox 1.5 server I build a long while back, and I need to log into it to add another container.

Thanks.
 
This all happens in GRUB, the bootloader. The 'init=/bin/bash' goes at the end of the kernel line (kernel=*)

When the Proxmox server boots and gets to grub, select the first profile in the list and press the 'e' key (edit), you will see three lines, the first tells grub where the boot partition (with kernel and grub conf) is located, the second tells it what kernel to load from that partition, and the 3rd tells it which initial ramdisk to use that contains a compressed set of drivers and system init items that is decompressed to RAM and used needed before the real root is mounted and programs can be executed from there.

Select the second line end press 'e' again, scroll to the end of the line and put your 'init=/bin/bash'. Press enter to save the change, then press 'b' to boot the modified profile.

Once you are dropped at a cmdline, run
Code:
#mount -o remount,rw /
#passwd
and follow instructions to change the password. Easy, huh? This is why physical security of your server is important.

All of the changes that you make in GRUB at boot are temporary, the next time that you boot the 'init=/bin/bash' will not be at the end of the kernel line.
 
Last edited by a moderator:
Hi my name is Mesut HAYLAR

my hand the IDRAC control panel over it how can.

Thanks for your help. Waiting for response.
 
This all happens in GRUB, the bootloader. The 'init=/bin/bash' goes at the end of the kernel line (kernel=*)

When the Proxmox server boots and gets to grub, select the first profile in the list and press the 'e' key (edit), you will see three lines, the first tells grub where the boot partition (with kernel and grub conf) is located, the second tells it what kernel to load from that partition, and the 3rd tells it which initial ramdisk to use that contains a compressed set of drivers and system init items that is decompressed to RAM and used needed before the real root is mounted and programs can be executed from there.

Select the second line end press 'e' again, scroll to the end of the line and put your 'init=/bin/bash'. Press enter to save the change, then press 'b' to boot the modified profile.

Once you are dropped at a cmdline, run
Code:
#mount -o remount,rw 
#passwd
and follow instructions to change the password. Easy, huh? This is why physical security of your server is important.

All of the changes that you make in GRUB at boot are temporary, the next time that you boot the 'init=/bin/bash' will not be at the end of the kernel line.

I have the same problem but I also have 9 lines not 3. I am sorry if I mistyped something.

Code:
insmod part_msdos
insmod ext2
set root= '(hd0,msdos1)'
search --no-floppy -- fs-uuid -set 3ea51eba-7fad-48bc-bbdd-2af70291b\
30c
echo 'Loading Linux 2.6.32-11-pve ...'
linus /vmlinuz-2.6.32-11-pve root=/dev/mapper/pve-root ro quiet
echo 'Loading initial ramdisk ...'
initrd /initrd.img-2.6.32-11-pve
 
You get 9 lines when using 'e' to edit the GRUB menu entry? They must have switched to grub2.

Code:
linus /vmlinuz-2.6.32-11-pve root=/dev/mapper/pve-root ro quiet

I believe this is the line you are looking for. Append init=/bin/bash at the end. You probably want to remove quiet as well so that you can see the password prompt and boot process.

There are references on the Internet stating that holding the Shift key during boot will load Recovery Mode in GRUB, please report back if this works.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!