Reset root password on Linux machine

12:56 pm Linux

linuxlockedIf 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 Response
  1. types of forklifts :

    Date: June 25, 2012 @ 5:47 pm

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

Leave a Comment

Your comment

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.