Reset root password in Debian
Today I’ve faced embarrassing situation, I’ve forgot my root password to my Debian VM. I know this is lame. But happened, so I’ve started looking for solution and after viewing few more or less helpful websites I’ve compiled my own solution. To reset root password on Debian (Lenny) do following:
- During start of PC when there is your boot manager displayed press “e”.
- Move arrow on the keyboard to highlight “kernel”.
- Press “e” again.
- On the displayed line change “ro” to “rw” and add “init=/bin/bash” at the end. Without quotation marks of course.
- Press Enter and then “b” to boot your Debian.
- Debian would boot to bash console with root privileges. Now execute “passwd” command and input your new password.
- Reboot your system.
That’s it. Your root account is now back. Enjoy!