Using Grub To Change RedHat Linux’s Root Password

Posted by suvi under CentOS, Other

Hey There,

I’m back from the dead and no longer cursing Vista ( I’ve always thought it was strange that most people, including myself, feel disappointment or sorrow when they lose something they didn’t have in the first place. The opposite seems perfectly logical. I feel very relieved that I no longer have something that I never had before ;)

Today, we’re going to take a look at a quick way to get back your root password (assuming its yours) if, for some reason, you get locked out of your machine. It happens… more than I’d care to admit ;) The course of action I see followed most often is booting from CD, temporarily mounting the physical root drive, and editing /etc/passwd. This is a time-tested solution, and works on pretty much any version of Linux or Unix I’ve worked with, but I think this way is more fun (and slightly less dangerous). Plus, it saves you a little time (not a lot; just a little). We haven’t taken a look at grub since our post on recovering failed raid disks, so I guess this post is about due.

Read more at The Linux and Unix Menagerie

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word