Today I faced a simple but tricky task: logging into a Ubuntu Server without knowing the password. Easy? Usually yes, but not when you're locked out.
Fortunately, the VM was running on Proxmox with the QEMU Guest Agent installed and enabled. This makes resetting the credentials a breeze, as it allows the host to communicate directly with the guest OS.
Here is the quick workflow:
First, log into your Proxmox shell (via SSH or the web console) and list all running VMs to find the correct ID:
root@proxmox:~# qm list
Once you have the VM ID (e.g.,
101) and the username (e.g., root or ubuntu), run the following command:root@proxmox:~# qm guest passwd <VM_ID> <username>
Proxmox will prompt you to enter the new password twice. After that I was able to log into the Ubuntu Server!
That's all!