Lost root password

nooboob

New Member
May 20, 2010
4
0
1
I've inherited a PVE 1.5 box that's up and running just fine. The problem is that no one knows the root password. The guy who set it up was a victim of downsizing.

I've searched around on how to reset the password, but I'm having no luck.

As I understand it, I need a live cd like Knoppix. I downloaded Knoppix but it started to boot but never loaded. I then tried Damn Small Linux, but was unable to mount the file system to change the password.

I also tried booting the PVE kernel, appending init=/bin/bash. Again, no luck (an in all honesty, no clue).

If anyone is willing to help a business analyst who's no serving double duty as a sysadmin, sans the education and experience, I'd very much appreciate it.
 
load the system appending init=/bin/bash and changing the ro parameter to rw

then passwd
and you will be asked for changing password...

reboot and voila'

second:

load the kernel with init=/bin/bash

at the bash prompt

mount -o remount,rw /

and then
passwd


the problem is that normally the system will mounted readonly until all is up


Diaolin
 
diaolin,

Can I append init=/bin/bash and change the ro parameter to rw to the PVE startup options or is a rescue/live cd required?
 
I tried appending init=/bin/bash to the grub line

kernel /vmlinuz-2.2.24-11-pve root=/dev/mapper/pve-root ro init=/bash/bin

but I still get prompted for a login.
 
i'm very disappointed...
could you please write exactly the append i wrote????

please take just a moment on the cmdline.....

press E when you see the grub

then press E on the second line

append init=/bin/bash

then
press ESC 1 time
and then press B

Diaolin
 
It worked just like you said it would. I'm not sure the command prompt is the best world for a dyslexic like me to live in. Then again, I'm not really an IT person either.

Thanks for you help and patience.
 
I also have a Proxmox 1.5 server that I need to reset the root password on, and have tried booting from dsl => can't find my drives, boot to Grub, and tried to edit the boot options, which didn't seem to do anything but take me back to the normal boot prompt that I don't remember the password for.

In terms that are explicit for those who may not take for granted knowledge of Linux CLI, can someone please tell me how I'm supposed to do this, or where I can do further research to accomplish this task?

load the system appending init=/bin/bash and changing the ro parameter to rw

then passwd
and you will be asked for changing password...

reboot and voila'

second:

load the kernel with init=/bin/bash

at the bash prompt

mount -o remount,rw /

and then
passwd

When booting to the bootloader, I then press "e" to edit it (I'm looking at a choice between booting the system, or booting to memtest86, I think)

I selected the 2nd item to edit, backspace over the ro, and change to rw, and then type in "append init=/bin/bash" without the quotes (I've also tried without the word append, and no change)

Where & when am I to type in "passwd"? The only command prompt I can get to is asking me to log in already.

I've also tried booting to the rescueCD as mentioned earlier, and can't seem to find my drives - this system has a hardware 3Ware RAID controller that every drive is plugged into - do I need a custom mod to the liveCDs to be able to add drivers for that controller so I can mount my drive array?

Please help,

Thanks
 
I've always had success in these cases by using the Debian Live distro (http://live.debian.net/). It has the drivers for 3ware and many others, constantly updated, etc. No fiddling with boot options, boot straight to the CD. Sometimes I need to create a temporary mdadm.conf to make my life easier and a series of vgscan, vgchange -ay commands to get to the root device, but eventually almost all cases can be solved with it.
 
I have a Proxmox 1.5 cd that I tried booting to, and after pressing Ctrl-D, it just seemed to hang up, so I don't know what went wrong there either.

This hardware consists of:

A Tyan Quad CPU server motherboard, with (4) AMD Opteron quad-core 8056 CPUs
32 Gb of ECC RAM
3Ware 9650 series RAID controller
basic SATA drives in a RAID5 configuration with 1 hot spare.

Everything is on the hardware RAID array, there are no "system" drives, although this experience suggests that I might want to alter that in the future, or just put the root password in the safe...

As far as good old fashion server muscle, this setup has most everything I could ask for from a single server, and it has been very reliable, to the point of forgetting about it, unfortunately.
 
As an update, I am now able to boot up with the Proxmox VE 1.8 CD, and get the debug boot to make it to the graphical install, where I have a chance to abort and go to a CLI.
As per the wiki pages, I have identified my RAID array as a block device /sys/block/sda

I believe that sda1 is the old system /, sda2 is the bulk of the rest of the system, and sda3 may be /tmp or /swap (I don't remember)

Either way, I'm unable to mount anything from it, and am back to scratching my head, although I believe I am close to there. What do I need to do next to be able to mount the correct partition, chroot to it, and reset the root password? I tried passwd from the bash prompt, and it told me that the token was busy, so I know I'm not in the right place yet.

Thanks

ps. The other problem with this server, is that once it was deployed and determined to be functional & stable, it was moved from the technician's bench, to the bowels of the building, with backup power & cooling, and no monitor, mouse or keyboard... I have a monitor & usb mouse + keyboard plugged into it, but it is somewhat painfully awkward to even physically get to this system to see the screen or type anything on the keyboard, because I'm crawling at that point. Once I can get the root password reset, I can go back to administering it remotely from civilization, and stop wrecking my knees & elbows, trying to get to it. I think my wife would appreciate my not tearing up my clothes or getting them dirty, also ;)
 
Last edited:
As an update, I am now able to boot up with the Proxmox VE 1.8 CD, and get the debug boot to make it to the graphical install, where I have a chance to abort and go to a CLI.
As per the wiki pages, I have identified my RAID array as a block device /sys/block/sda

I believe that sda1 is the old system /, sda2 is the bulk of the rest of the system, and sda3 may be /tmp or /swap (I don't remember)

Either way, I'm unable to mount anything from it, and am back to scratching my head, although I believe I am close to there. What do I need to do next to be able to mount the correct partition, chroot to it, and reset the root password? ...

A default Proxmox VE installation uses LVM, you you need to activate LVM and mount the root volume, chroot into it and then you can make the changes.

short howto:

  • type 'lvs' to see your logical volumes (data, root, swap)
  • activate it with: 'lvchange pve -ay'
  • mount the root volume: mount /dev/pve/root /mnt
  • chroot into it: chroot /mnt
  • do the needed changes and exit, reboot
 
Alright, just a short note as it seems you have never did something similar. If you get into your system using the method outlined above, you might not see the volume groups and the volumes right away with vgs and lvs commands. In that case issue a vgscan command, and then a vgchange -ay pve (I think Tom made a mistake here). The other thing I wanted to mention is that you don't need to chroot and issue a passwd, you can simply delete the hashed password for root between the first and the second colons in /mounted-temp-root/etc/shadow. It renders the root account passwordless, so as soon as you have your machine up and running again, change the password with passwd.
 
Not sure if the last comment would have helped or not, because I did exactly what you listed, and it worked like a charm. Thanks, and I believe the boss just approved a donation to this project :)

Thanks for all your help, and thanks for everyone who has tried to help in this thread too!

Addendum: Our company just donated 100 euro to this worthy cause.
 
Last edited:
That's nice you solved it either way.

An interesting tidbit is that lvchange accepts volume group names, altho it's not mentioned in the docs.