The only essential thing is that you should have a Linux boot CD of the same operating system for which you want to crack root password. Some other Linux boot CD may work in some cases. If system is able to boot from the CD, it will take you to a command prompt as shown.

boot:

Type ‘linux rescue’ at this command prompt and enter as shown

boot: linux rescue [Enter]

It will take you to some interface with some questions, answer them properly. The system will go to temporary command prompt. Then issue the following commands

1
2
3
[bash$] chroot /mnt/sysimage [Enter]
[bash$] cd /boot/grub [Enter]
[bash$] vi menu.lst [Enter]

Now in this file you can see a line beginning with the word ‘password’ remove this line and save the file.

1
2
[bash$]exit
[bash$]exit

Now system will be rebooted and you can see the grub without a password. Don’t forget to remove the CD.

Press ‘e’ at boot screen and again by taking the pointer to the second line press e. Now you can see yourself on a command prompt. Remove ‘rhgb quiet’ from there and write single and press enter.

Now you will come back to the boot screen. Press ‘b’ and system will appear to boot and leave you in command line interface like this.

-bash2-$

Just type passwd like this

1
2
3
4
-bash2-$ passwd [Enter]
new password:
retype new password:
passwd: All authentication updated successfully.

Now you have set a new password. Now exit from the shell and system will boot properly in graphical interface.

-bash2-$ exit [Enter]

If there is any error in the procedure please post your suggestions.

Recommended Posts

{ 11 comments… read them below or add one }

1 kulbirsaini September 27, 2006 at 9:26 PM

hey i dont know how to do that …. i just described the situation when u have physical access to the server ….

Reply

2 jaq August 20, 2007 at 1:54 AM

hi !!
I want to know about how to crack root password which is also grub password protected.One main problem is that the system has no cd drive .Any method to crack though USB ???

Reply

3 General Bordeaux August 22, 2007 at 2:25 PM

@Jaq
Yes. If you have installed a small Linux distro for example Ubuntu or Damn Small Linux in you USB drive. Now, you can boot from your USB drive to the Linux distro. Now, mount the partition allocated to /boot or / from the other hard drive to /mnt with write access. Now, the job is very easy, just modify the menu.lst file in /boot/grub/ as described above.
Hope this helps in right spirits.

Reply

4 abhay October 1, 2007 at 1:17 AM

sir, i have no installation cds , and i don’t know the passwd of root, and someone has set the root passwd..
so , how could i get into the root
or my system….

Reply

5 abhay October 1, 2007 at 1:19 AM

i don’t know the root passwd, and someone has set the grub passwd….
an di don’t have any installation cds …
how could i get into the system.???????????/

Reply

6 General Bordeaux October 1, 2007 at 1:28 AM

@Abhay
without installation/live cd you can’t recover root password :(

Reply

7 Visitor December 13, 2008 at 12:25 PM

Thanks a lot, this worked perfect. It took less than 5 minutes to set the new password.
alarm systems

Reply

8 AJAY May 27, 2009 at 6:06 AM

Nice and easy explanation thanks ……………….

Reply

9 a_widya September 27, 2006 at 7:06 PM

How to login to linux server with root ? ( I don’t have any login in that server ). I know the opened port, but I don’t know how to use it to hack the server.That server using Trustix or CentOS Linux. Thanks.

Reply

10 prashant September 5, 2011 at 4:01 PM

i entered the rescue mode,and got the shell also . but the problem is that when im typing ‘ chroot /mnt/sysimage’ ,is is showing an error ‘/sbin/sh not supported.what shall i do now ?
plz email me the solution

Reply

11 hashim khan November 18, 2011 at 10:03 AM

sir
how to crack BIOS passwd

Reply

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

Previous post:

Next post: