I have a few VM’s setup at home. One is Ubuntu. I haven’t been on it for a while. Figured I knew what the password was when I set it up months ago, but for some reason it wasn’t work. So how to change?
1. Reboot into “recovery mode”
Reboot, hold down shift and the boot menu will come up, choose the option with (recovery) at the end.
2. Mount as root
Once through that, choose the option to mount as root.
3. Reset Password
#passwd username (username is the username you want to reset)..
enter the password twice, and then
Bonus: If you get “Authentication token manipulation error” as I did, you need to remount your file system as read/write at the root prompt.
#mount -rw -o remount /
Bonus 2: Once you actually get into the system, it is going to probably complain about your keyrings password not matching. Goto your home folder (make sure you have all folders shown) and goto .gnome2/keyrings and delete and files and reboot.
Overall not that bad, but yeah, don’t lose your passwords. Keep them in a password manager! (I didn’t with this one of course, didn’t keep it in my head either!)