Pejman Moghadam / General

Linux root password recovery progress

Public domain


With GRUB bootloader

  1. If you have a GRUB password configured, type 'p' and enter the password.
  2. Select your linux kernel, and type 'e' for edit.
  3. Select the line that starts with 'kernel' and type 'e' to edit the line.
  4. Go to the end of the line and type 'single' and press 'Enter'.
  5. Type 'b' to boot into single user mode.
  6. Use 'passwd' command to change root password.
  7. Type 'exit'.
  8. Login with new password.

With Bootable CD

  1. Boot with your bootable CD.
  2. Type 'linux rescue' after 'boot:' prompt and press 'Enter'.
  3. In 'CD Found' window, choose 'skip'.
  4. In 'Choose Language' window, choose 'English'.
  5. In 'Keyboard Type' window, choose 'us'.
  6. In 'Rescue' window, choose 'continue'.
  7. In second 'Rescue' window, choose 'OK'.
  8. Use 'chroot /mnt/sysimage' command to change root file system.
  9. Use 'passwd' command to change root password.
  10. Use 'exit' command to exit from chroot mode.
  11. Use 'exit' command again for reboot.
  12. remove bootable CD.
  13. Login with new password.

BY: Pejman Moghadam
TAG: grub, password-recovery, boot-loader
DATE: 2007-09-20 16:31:27


Pejman Moghadam / General [ TXT ]