I forgot my root password...actually I think I know what it is because it is the same password I have for pretty much everything but in the Terminal in tell me "Sorry, try again." Is there a way to reset the password? If so how?

  • possible duplicate of How to reset Linux root and grub passwords? – Hauke Laging Jun 4 '13 at 2:21
  • @HaukeLaging That one is harder and specifically says they can't edit the grub boot line, which is the answer posted here – Michael Mrozek Jun 4 '13 at 2:35
  • @MichaelMrozek Right. I have to read more carefully. – Hauke Laging Jun 4 '13 at 2:40
  • If you are sure you know what the password is, then maybe it got truncated. On an old Linux once I set a 10 character password, which was somehow truncated to the first 8 characters. Just a hint. – manatwork Jun 4 '13 at 7:43
  1. At the GRUB prompt, press the letter, e, to edit.
  2. Scroll to the kernel's boot line.
  3. Add to the end of the kernel boot parameters this value: init=/bin/bash
  4. Press [ENTER] and then b to boot.
  5. Remount the root file system in read-write mode: mount -o remount,rw /
  6. Change the password: passwd
  7. Reboot: reboot
  • 1
    In my case I just added "single" to the end of kernel line and password change worked without the remount part. – Pawel Dubiel Oct 27 '13 at 14:59
  • on Debian Squeeze – Pawel Dubiel Oct 29 '13 at 23:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.