How to Hack Root Password in LinuxBy Angsuman Chakraborty, Gaea News Network
Monday, November 3, 2008
Today I am going to tell you the trick to hack your root passoword in Linux if you are too forgetful to remember it or you have legal permission to enter a server run by a different admin and by any chance he forgot to give you the root password.
Those Who Have GRUB bootloader
- The first step is to reboot server.
- Upon Linux booting up to GRUB loader GUI, move the arrow key up/down to highlight and select the Linux kernel and press
eto edit the GRUB commands before booting.
- Next, move the arrow key up/down and select the Linux kernel and press
- Give a single space and then type the word
singleat the end of edited line, as shown in this snapshot
- Press the ENTER key and now you have a a similar GRUB screenshot as of follow.Keep the Linux kernel highlighted and press
bto boot up with the single keyword, which will boot Linux into single user maintenance mode (You did nothing but to grant yourself the booting facility of a single user that is otherwise not visible while you enter the server as a root in a proper way)
- Once the Linux boot up completely into single user maintenance mode, the Linux command prompt is ready to execute command. Type
passwdto reset the forgotten root password - without prompting for old root password, just type a new root password and re-type to confirm it and you are done. You have successfully changed or reset the old password without having known the old one.
exitto reboot. On next boot up, you can login with the new root password!
Remember, it is for those who have GRUB bootloaders.
Those who have LILO boot loader
- First reboot the server
- When you see the LILO: prompt type linux single and hit enter.
- This will log you in as root in single user mode.
- Once booting is complete, you can change your password with this passwd followed by the new password you want to assign
- You are done.
P.S. - Admins, take a note and use passwords to secure LILO and GRUB so that no one gets access to boot loaders’ commands. I will surely come with a tutorial on that too.
Tags: Grub, Hack root password, LILO, Maintenance, The root