Proxmox VE – How to reset forgotten root password

Hello World,

It happens to me recenlty.  I have found an old Proxmox VE machine where I didn’t log into it for months.  That was time to decommission this test machine but I wanted to check what was left on this Proxmox VE instance.  Yes, I have to admit it.  I completely forgot the password of the root account on this machine.

I was wondering if there was a way to recover it or reset it !  Because Proxmox VE is based on a Debian linux distribution, yes, there is a way to reset the root password and get access to your machine.  This post will be really easy

Follow me !

Modifying the Boot Loader

Note : This should be working on all version of Proxmox VE.  I’m demonstrating the process with Proxmox VE 2.0 where the boot loader is “Grub”

You do not need to have any special tools or liveCD. In order to reset the password admin on the Proxmox VE machine, you will need to boot it and modify the boot loader so we will be booting in command prompt mode where you will be able to issue your reset password command.

Step 1 – Boot your Proxmox VE machine. In the boot menu screen, you select your boot option and instead of pressing enter to proceed, you simply press “e” on your keyboard.

Click on the picture for better resolution

This will bring you to screen where you can edit the boot configuration file and modify the way the system will boot.

Click on the picture for better resolution

Step 2 – Append the following text at the end of the line starting with linux :  init=/bin/sh

Click on the picture for better resolution

At this stage, simply press ctrl+x to boot your system.

Step 3 – Mount the filesystem

The system will boot in console mode. You will see something like this.

Click on the picture for better resolution

At the command line, you will have to type the following command : mount -o remount rw /

Click on the picture for better resolution

Step 4 – Reset the password for the root account.

We are almost done. In order to reset the password, you will have to digit the command passwd.  You will be asked to enter your new password and confirm it.

Click on the picture for better resolution

When it’s done, simply reboot your system and try to login using the newly resetted password.  You should be able to login into your Proxmox VE system.

Final Notes

You might want to document this procedure in case you loose your password for the root account.  The Proxmox VE 2.0 has a role based model administration that should help you minimize annoyance of loosing password.  I’m assuming that with the role based models, organization will define more than one full administrative account in order to have a secondary account that could be used to recover or access the system in case of problem with the root account.  We will see what future brings. 🙂

That’s it for this post

Till next Time …See you

 

9 thoughts on “Proxmox VE – How to reset forgotten root password

  1. tks. Keep informing the community about proxmox. There are not many web resources dealing with that specific tech.

  2. Hello Orowk

    Thank for the nice comment. I wish I had more time to work on it… and write more posts…

    Till Next Time
    See ya

  3. yeah, cool, but why? 🙂

    login via website, click the virtual machine, click console, boing, got root.

  4. I’m trying to do it but exactly when i press “e” the screens turns black and ask for username and password. It seems to be needed to enter the screen for edit that configuration.

    I can’t access to my server and I don’t change the password.

    Can you help me?

  5. I need to find the password, but as this on a server so I can not restart.

    Any suggestion?

  6. Hello Francisco;

    I do not understand your question. If you need to reset a password, you would need indeed to restart the server and access the command line to reset it. If you need to retrieve a password you could try any cracking password tool available on Internet. Check John the ripper for example…

    disclaimer : I do not encourage you to crack password on system you are not owning

    Hope this help
    Till next time
    See ya

Leave a Reply