Linux Forums - Linux Help,Advice & support community:LinuxSolved.com

Linux in General => Linux Tutorials & How To's => Topic started by: h4ck3r on June 18, 2005, 12:59:40 PM

Title: Breaking/resetting the GRUB password
Post by: h4ck3r on June 18, 2005, 12:59:40 PM
===================================================
METHOD 1
===================================================
HOW TO RESET UR ROOT PASSWORD IF U FORGET IT

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..
===================================================
METHOD 2
===================================================
"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.
===================================================
METHOD 3
===================================================
Question.
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.

Answer.
 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...
Title: Breaking/resetting the GRUB password
Post by: Ricky on June 18, 2005, 02:15:08 PM
Cool.. I will sure tell many people about who keeps on forgetting .
Title: Breaking/resetting the GRUB password
Post by: h4ck3r on June 18, 2005, 04:53:10 PM
Thanks
Title: need help
Post by: haronet on June 22, 2005, 02:09:14 AM
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.
Title: Breaking/resetting the GRUB password
Post by: h4ck3r on June 22, 2005, 12:49:40 PM
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: [Select]

[root@localhost root] passwd


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.  :)
Title: great stuff
Post by: Stuart36 on March 13, 2007, 05:04:44 AM
:D awesome...ran across this post and thought it was worth printing out for future reference....never know when it might come in handy.  :wink:
Title: Re: Breaking/resetting the GRUB password
Post by: arvindsony on May 19, 2009, 11:30:34 AM
thankxxxxx