Recover your lost root password in Linux

Posted by suvi under Linux

Once in a lifetime you might forget your root password. If that happens, reboot your distro and at the GRUB prompt press “e” to edit the first line. Make sure the new entry sais “linux single”. Press “b” to boot the new entry line. You’ll be thrown into single user mode and given a BASH prompt. Do a

cd /etc
nano passwd

Now see that line that sais

root:x:0:0:root:/root:/bin/bash

somewhere at the top of the file? Make it look like

Read more at Tips4LInux

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word