Linux root password recovery progress
Written by vaheeD on December 28, 2012
With GRUB bootloader
- If you have a GRUB password configured, type ‘p’ and enter the password.
- Select your linux kernel, and type ‘e’ for edit.
- Select the line that starts with ‘kernel’ and type ‘e’ to edit the line.
- Go to the end of the line and type ‘single’ and press ‘Enter’.
- Type ‘b’ to boot into single user mode.
- Use ‘passwd’ command to change root password.
- Type ‘exit’.
- Login with new password.
With Bootable CD
- Boot with your bootable CD.
- Type ‘linux rescue’ after ‘boot:’ prompt and press ‘Enter’.
- In ‘CD Found’ window, choose ‘skip’.
- In ‘Choose Language’ window, choose ‘English’.
- In ‘Keyboard Type’ window, choose ‘us’.
- In ‘Rescue’ window, choose ‘continue’.
- In second ‘Rescue’ window, choose ‘OK’.
- Use ‘chroot /mnt/sysimage’ command to change root file system.
- Use ‘passwd’ command to change root password.
- Use ‘exit’ command to exit from chroot mode.
- Use ‘exit’ command again for reboot.
- remove bootable CD.
- Login with new password.