If we forget our Linux root password, we can change it by changing grub's boot options.

But in this case, we also set a grub password and forgot both passwords. How can we recover both?


Boot from a LiveCD, then mount the / harddrive partition. You can now chroot into your harddrive and just run passwd as root there changing the root pw. That's also the way to change to grub password.

  • Presently i'm using fedora, Is it possible to use ubuntu live CD for change password ? – Kumar Sep 20 '10 at 9:58
  • 3
    Yeah, it doesn't really matter what distribution you use. – tante Sep 20 '10 at 10:11
  • @Kumar P: But you should use an 32bit CD for an 32bit system and 64bit CD for 64bit system – krissi Sep 20 '10 at 10:26
  • 1
    @krissi: Techincally you need 64bit kernel for 64bit system and any kernel for 32bit system. So SysResCD booted with 64-bit kernel (it has only 32-bit userland) can chroot both into 32 and 64 bit systems. – Maciej Piechotka Sep 20 '10 at 13:06
  • @Maciej Piechotka: Thats right. But I ran into some trouble in the past with mixing 64bit CD and 32bit. Don't ask my why this happend (maybe some tools read the wrong data from /sys or /proc). Maybe it has changed meanwhile, but I keep my pendrive with both, 32bit and 64bit Linux ;) – krissi Sep 20 '10 at 13:18

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.