http://pcproblems.afraid.org

Root password recovery in Linux


Forums
Home
Links

Solutions

Windows 9x/ME/XP
Internet
Linux/Unix
Hardware Issues
Misc Issues

Drivers

VGA(PCI/AGP)
Audio
Other Drivers

Others

Feedback
Precautions
Handy Freewares
Google Page Rank
Check Anonymity
Web Proxy List
Image Host List
Other Links

Recovering or Resetting Root password in Linux

For any linux administrator, it is a nightmare to forget his root password. Every one who knows linux, know how important it is to get back the system control in such situations. I too had such situations, and here is what i did when i lost the root password for my linux system.

Btw, Using this, you can only reset or change the old password, You can't recover or see what it was.

For Grub boot loader users :-

  • Start the system, the grub boot loader starts.
  • Hilight 'Redhat Linux' entry in the grub menu.
  • Press [E] to edit the boot configuration.
  • Find the line which looks like
    'kernel /boot/vmlinuz-2.4.20-0.70 root=LABEL=/hdc=ide-scsi'
  • Type number 1 (digit one) at the line's end.
  • This boots the system into Single User Mode and You'll be automatically logged as root(without asking for password).
  • Now change your current root password using 'passwd' command.
  • Now you have successfully changed your root password.

For LILO boot loader users :-

  • Start the system.
  • At the lilo boot prompt, type 'linux single' (without quotes).
  • This boots the system into Single User Mode and You'll be automatically logged as root(without asking for password).
  • Now change your current root password using 'passwd' command.
  • Now you have successfully changed your root password.