The daily ramblings …

Linux HOWTO : How to recover lost password

Posted in Linux / Unix by akamal on March 2, 2007

Why am writing things like this again? Well, I encountered another problem here at work, seems that I forgot my root password. After 5 minutes search of solution, found it, and posting it here.

You can’t recover the password you have forgotten, but you’re able to reset to a new password. Here are the steps you should do:

Note: This works for Red-Hat and Fedora Core systems, and if you have GRUB as bootloader.

[Main Method]

  1. Press ‘e’ at GRUB prompt to select the boot parameters.
  2. Select the line for the kernel you want to boot, and go to end of it.
  3. Add “single” as a seperate word (in a new line).
  4. Now press “ENTER” to exit the edit mode.
  5. Once back at the GRUB screen, press “b” to boot into single user mode.
  6. Now you can set a new root password!

[Another Method]

  1. At startup just edit the line, where it’s written Linux and write value
    init 0
  2. You will then be automatically booted as root without even password confirmation and then you can reset the password in the normal desktop terminal
    passwd
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: