[LBo] TUX tip - passwd recovery using grub

Sam Morgan sam at linuxbasics.org
Tue Jul 18 14:37:55 CEST 2006


 From the TUX magazine
http://www.tuxmagazine.com/

email I found this tip on password recovery when using grub....

<quote>
Last But not Least: Tech Tip!

    TUX editor Daniel McCarthy says:

    "A page that is frequently hit on my site is how to recover the root
    password.  I've written up the following on how to recover the password
    using Grub.  If you have ever forgotten the root password for any of your
    machines you know what a hassle it can be.  If you have direct access to the
    machine and it is using the Grub boot loader it is very easy to change the
    password.

    All you need to do is reboot the machine.  When you are presented with the
    Grub menu, hit the 'e' key.  This will allow you to edit the current boot
    options.  Select the line that begins with 'kernel', hit the 'e' key again to
    edit that line and add the word 'single' at the end of the line and press the
    Enter key.  Now press 'b' to boot with the modified boot options.

    You'll now be presented with the command line.  At the command line simply
    enter 'passwd' and press Enter.  You'll be prompted, twice, for a new
    password.

    After you have finished entering the new password, type in 'exit' and press
    Enter, and the machine will continue booting into the normal process.  Your
    root password has now been changed."
</quote>

-- 
God Bless,
Sam Morgan

linux the lifetime learning experience



More information about the QnA mailing list