So I managed to forget the password to my Proxmox resource monitoring container today. I haven’t been in it in many months. I really need to set up my own self-hosted password manager, but that’s another project for another day…
How to reset your Proxmox LXC container root password:
Grab the container ID (the number next to the container name in the Proxmox node). In my case, the container “monitor” runs under the ID 150.
Open up a shell (as root) into the container from the Proxmox host:
lxc-attach -n 150
Change your password:
That’s it! You’ve just rescued your LXC container in Proxmox.