|
Howto reset root password on linux |
| Problem: | | | I have forgot my Linux root password. How can I reset it ? |
To reset root password on linux, you need to boot as single user mode or level 1. If you do not have access to your rack, simply use Remote Console to do this. Login to your remote console Reset/Reboot your server If you don't see either a LILO or GRUB boot screen, try hitting CTRL-X to get one If it's LILO, just type "linux single" and that should do it If GRUB, hit 'e", then select the "kernel" line, hit "e" again, and add " single" (or just " 1") to the end of the line. Press ENTER, and then "b" to boot Important: If your system still ask for root password to login please add "single init=/bin/bash" instead of "single"
Type: mount -o remount,rw / Type: mount /proc Type: passwd root (and then type the new passwords) Type: sync Type: mount -n -o remount,ro / Reboot your server: /sbin/shutdown -rn now You are done! |