How do I reset a forgotten server root password under Linux?
If you forgot your server root password, don’t panic, follow these easy instructions to reset it.
- Reboot the server => when you are at the kernel selection prompt, highlight the kernel and press ‘e’
- On the next screen, you should see an entry begins with ‘kernel’, highlight it and press ‘e’ again
- It would now allow you to edit the line => append ‘ single’ to the end of the line (without quote). This means you make a space then type in the word single
- Hit ‘Enter’ => then press ‘b’ to boot
- Once the server finishes booting, type ‘passwd’ and enter a new password
- Type ‘reboot’ to reboot the server
Done