November 21, 2024, 10:53:18 PM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: Breaking/resetting the GRUB password  (Read 25113 times)

Offline h4ck3r

  • Linux Noob !
  • *
  • Posts: 14
    • http://www.hnc3k.tk
Breaking/resetting the GRUB password
« 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...

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
Breaking/resetting the GRUB password
« Reply #1 on: June 18, 2005, 02:15:08 PM »
Cool.. I will sure tell many people about who keeps on forgetting .

Offline h4ck3r

  • Linux Noob !
  • *
  • Posts: 14
    • http://www.hnc3k.tk
Breaking/resetting the GRUB password
« Reply #2 on: June 18, 2005, 04:53:10 PM »
Thanks

Offline haronet

  • New Member
  • Posts: 1
need help
« Reply #3 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.

Offline h4ck3r

  • Linux Noob !
  • *
  • Posts: 14
    • http://www.hnc3k.tk
Breaking/resetting the GRUB password
« Reply #4 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.  :)

Offline Stuart36

  • Linux Noob !
  • *
  • Posts: 4
great stuff
« Reply #5 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:

Offline arvindsony

  • Linux Noob !
  • *
  • Posts: 6
Re: Breaking/resetting the GRUB password
« Reply #6 on: May 19, 2009, 11:30:34 AM »
thankxxxxx