Monday, March 7, 2011

Root Password Recovery

If you forget the root password, you can change it by entering the system in single user mode, as shown below.

1.) To enter in single user mode, restart the system, and select your Linux OS
     (do  not press Enter on it).
2.) Now, press 'e' on the kernel line to edit the kernel parameters.
3.) Add 'S' as the kernel parameter ( do not add quotes).
4.) Press Enter to escape from editing; Now, press 'b' to boot.
5.) You'll on the root shell. Now It's time to change the password.

#passwd

You'll now be asked for the new password.


If you have forgotten the grub password, then use any Linux Live CD. Go to the specific drive that has your Linux/boot and edit grub.conf and comment out the password line to remove the password.