[SOLVED] Root password reset - Proxmox VE 1.9

BoxPopuli

New Member
Jul 12, 2012
1
0
1
Portland, OR
Hello World, welcome to my first forum post.

I recently inherited ownership of a Proxmox cluster but not the root credentials. I Googled and tried just about everything I could find, but I just couldn't get the init=/bin/bash string to drop me to a prompt. I finally found a combination that worked for me reliably, so I thought I'd share. If you can get your server to give you a root prompt by appending init=/bin/bash to the kernel line in grub then by all means I'd recommend that!

This was done with the help of two sources:
http://linuxers.org/howto/how-mount-linux-lvm-volume-partitions-linux and
http://linuxgazette.net/107/tomar.html
My hats off to them!

Requirements:

  • Debian Live Rescue CD - download at http://www.debian.org/CD/live/. Either the Gnome or KDE versions will work. This guide was written using the debian-live-6.0.4-i386-rescue.iso image.
  • Physical access to the Proxmox server

Overview
The Proxmox system utilizes LVM volumes to dynamically manage storage across physical disks. In order to change the password for the root user, perform the following steps:

  1. Boot the server with the Debian Live CD
  2. Select Live from the boot menu
  3. At the $ prompt, type sudo -i to escalate to root
  4. Enter the command pvs to display the LVM volume groups. Make note of the value in the VG column, this is the VG Name.
  5. Type lvdisplay [VG Name] and press enter to list the parameters for the volume group that contains our files. The output will be a series of logical volumes managed by the LVM system. We are looking for the root filesystem, which should look something like /dev/pve/root. My server also has /dev/pve/swap and /dev/pve/data entries, which corresponds to the Proxmox server’s swap and container storage volumes respectively.
    The LV Name is a device that can be used by mount to allow access to the filesystem.
  6. Type mount [LV Name] /mnt and press enter to mount the root partition of the Proxmox server on the /mnt folder of the running filesystem.
  7. Type cd /mnt/etc to change to the /etc folder of the Proxmox server
  8. Type vi shadow to edit the password shadow file
  9. Find the line that starts with root: and delete all characters between the first and second colons on that line. The result should look something like root::15533:0:99999:7:::
  10. Save the file and exit vi
  11. Use the reboot command to reboot the server and remove the Debian Boot CD from the CD drive when prompted
  12. The server will come up to a root prompt without login as the root user now has no password. Use the passwd root command to set a new root password.

I hope this helps someone and saves them the time it took me hunting around.

Cheers!

Greg
 
Last edited:

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!