Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 9 down vote accepted

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.

share|improve this answer
Presently i'm using fedora, Is it possible to use ubuntu live CD for change password ? – Kumar Sep 20 '10 at 9:58
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
@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 posting your answer, you agree to the privacy policy and terms of service.

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