Skip to content

Reset root password on Linux machine

32linuxlockedIf you forget your Linux root password, you can maybe reset it if you have physical access to the machine.

  1. Go to the Linux server machine.
  2. You will see the login prompt
  3. Press Ctrl-Alt-Del (three keys at the same time)
  4. The machine will reboot. If Ctrl-Alt-Del doesn’t work, try Ctrl-Alt-Backspace.
  5. Wait for the machine to finish rebooting (this may take a few minutes especially if the machine does a hard drive integrity check on startup).
  6. You will see a lilo: prompt.
  7. Enter linux single to start single user mode.
  8. Enter passwd to set the new root password.
  9. Enter the new root password (you will enter it twice).
  10. Press Ctrl-D to start multi-user mode (which is the normal Linux mode).
  11. You will see the login prompt again.
  12. Enter root for username.
  13. Enter your new root password.
  14. You should be logged in as root.
  15. Enter exit to logout.

One Comment

  1. It’s difficult to find knowledgeable people about this subject, but you seem like you know what you’re talking about! Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *