14 March 2011

Change the lost Root Password on Linux

If the root password is lost in a single user mode on Linux:

Then follow the steps below to change it:

Using GRUB, you can manually edit the proposed menu entry at boot time. To do so, when GRUB is presenting the menu list (you might need to press ESC first), follow those instructions:

* use the arrows to select the boot entry you want to modify.
* press e to edit the entry
* use the arrows to go to kernel line
* press e to edit this entry
* at the end of the line add the word single
* press enter to save the changes
* press ESC to go back to the parent menu
* press b to boot this kernel
* Change the root password: #passwd

No comments:

Post a Comment