Monday, June 28, 2010

How to recover a root password in Linux using single user mode

Follow the below steps to enter into the single user mode in linux:-

1. use the arrows to select the boot entry you want to modify.
2. press e to edit the entry
3. use the arrows to go to kernel line
4. press e to edit this entry
5. at the end of the line add the word single
6. press ESC to go back to the parent menu
7. press b to boot this kernel

Then your system boots and takes you to the single user mode by providing a console to you.

then you can change your root password using a command as

#passwd root

enter the password of your choice and reboot the system once.

1 comment: