Linux in General > Linux Tutorials & How To's

Breaking/resetting the GRUB password

(1/2) > >>


While Booting ( Redhat )   just press "e" in GRUB
u will find 3 lines of code..
Goto to the 2nd line press "e"again and type "1" in the end
 then press ENTER..
Then press "b" and it will boot you into your shell..
Just type "passwd" and change ur ROOT password...
dont need to know the old one..
"I, uh, forgot the root password"

Let's look at recovering the root password from the boot loader. If you're using GRUB, then, as GRUB loads up, highlight the Red Hat Linux entry on the GRUB menu and then press [E] to edit the boot configuration. Locate the following line, something that looks like this:

kernel /boot/vmlinuz-2.4.20-0.70 root=LABEL=/hdc=ide-scsi

Type the number '1' at the end. Doing so boots the PC into run level 1-single user mode, where you're automatically logged in as root. This done, type 'passwd' at the prompt. You can enter a new password here.
I am doing a project on Linux platform. Someone has added the GRUB password to the computer on which I am working and has also changed the root password. I can crack the root password, if there is no Grum password, from the initial screen (i.e. from the init 1); but with the GRUB password. While reading LinuxForYou, I saw your section and thought you may be able to help.

 To break the GRUB start-up password, follow the steps given below:

1. Boot the system with the first Linux CD. At the boot prompt, type linux rescue to switch to rescue mode. In rescue mode you will be asked if similar steps should be followed, which need to be followed in the installation. Once you get the # prompt, type the following command:

# chmod /mnt/sysImage

2. Edit the grub.conf file and remove the passwd line from the file. Save the file and exit.

3. Once your machine reboots, you will be able to start your Linux OS in the usual manner.

That's all folks...

Cool.. I will sure tell many people about who keeps on forgetting .


just bought a PC with Linux already installed on it.  I tried to go into the Root directory and type # SU
and then it requires a password, i know this sounds like a dumm question where would i find the password so i can get into the root dir.
any help i'd appreciate it.

Ask the firm for the root password which they supplied during installation.
Note it down. Once u are ready
goto terminal and login as superuser

Now type passwd followed by a carriage return.

--- Code: ---
[root@localhost root] passwd

--- End code ---

Now it will ask the old passwd, enter it and enter a new password and then confirm the new password and press enter.

You have changed the root password for Linux

BTW , Read the rules as this isnt the place to ask questions.  :)


[0] Message Index

[#] Next page

Go to full version