[SOLVED] Reset user password in VM

gmbeniamin

New Member
Feb 5, 2021
19
1
3
28
My team and I made the huge mistake of not saving the credentials of one of our VMs. That VM got populated with customer data and in no time we came to the conclusion we had lost access to that very VM.

We used Ubuntu 18.04. We know the name of the user but the password does not want to work. We are used to working with containers and the VM is a foreign continent for us. We tried looking for tutorials but we do not even know how to boot the VM with GRUB. It is pretty hard for us to solve this issue by our own.

If there is anybody who can tell us if changing the password is even possible we would greatly appreciate it.
 
Boot the VM with a Ubuntu installation ISO (or any other Linux Live CD, as they are often called) and mount the VM disk in a chroot an change the (root) password.
This is the same as "how do I reset the root password with physical access?" for a real Linux machine. Maybe this description can be of help?
 
  • Like
Reactions: gmbeniamin
After a dozen failed attempts and searching the web when meeting a new error I came to the conclusion that the best option is not trying to do something I am not aware of. Nobody in my team is confident enough to try. This is for the live CD method. However, the GRUB method seems easier to handle and less risky. Is there a chance we can launch GRUB in that VM?
 
Ubuntu 18.04 uses GRUB to boot, so just press e when the menu appears. If there is no menu visible, maybe change the settings in /etc/default/grub and run sudo update-grub and reboot to try again.
 
Should I make the changes on the HOST machine where PROXMOX is installed? It is impossible to make this changes on the VM as I forgot the root credentials.
 
Should I make the changes on the HOST machine where PROXMOX is installed? It is impossible to make this changes on the VM as I forgot the root credentials.
No, you need to do that inside the VM using root, sorry. Otherwise just start pressing 'e' (in the VM) as soon as the VM starts to enter the GRUB menu.
The alternatives are using a LiveCD ISO (which did not work out for you) or mounting the virtual disk inside another VM (when the problematic VM is turned off!), but this is very similar to a LiveCD ISO.
 
  • Like
Reactions: gmbeniamin
Actually I managed to do it. I pressed ESC in when the server first booted. There was a PROXMOX logo and the option to press ESC for the BOOT menu. I don't know how I missed that but I think I was not fast enough to see it before.

I have no clue how to mention a member in this text but avw, thank you for your prompt response, the first time and now, and thank you for showing me what I should do. Even if I didn't end up using the LIVE CD method the link you provided helped me in using the GRUB method.

Thank you for your time!
 
  • Like
Reactions: leesteken

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!