Bayanihan Linux Repository
Advanced Science and Technology Institute

8 December 2008

Troubleshooting: Lost ROOT password TIP

Lost your root password? Try this tip:
  1. Reboot Bayanihan Linux and select "recovery mode"
  2. Use the arrow keys to select the 2nd line and press "e" to edit it.
  3. Type "init=/bin/sh" at the end of the line, press Enter and then press "b" to boot the system.
  4. Type "mount -n -o remount,rw /" at the prompt.
  5. Type "mount -avt noproc" at the prompt.
  6. Edit the files /etc/shadow and /etc/shadow- if it exists by typing mc -e <name of file>.
  7. Delete the string that follows root: but only up to the second colon.
  8. Save the files by pressing F2 and exit the editor by pressing F10.
  9. Type reboot at the prompt to restart the system and again select "recovery mode".
  10. Press Enter at the prompt.
  11. Type passwd and press Enter and type in your "new" root password.
  12. Press Ctrl+D to proceed to the login screen.
Permalink | tips, troubleshoot.