Monday, December 24, 2007

Hacking Linux root accounts via grub


This is a very common and popular way to reset root password if grub is not password protected by the system administrator.

Places you can try: SOC level 8 PC labs. They recently installed fc6 but forgot to protect grub ;)

Note: With great power comes great responsibilities. Use the root account with caution.


1. Switch on the pc and press a key to bypass the default OS boot.
2. Grub menu will show up.
3. Highlight the entry that displays the selected linux distro and type e
4. This takes you to the edit mode. Highlight the second entry (leave the rescue entry) and add single at the end to the boot entry

5. Once you have done that. Enter b
6. Your installed linux distro will reboot and take you to the init 1 or single or admin mode.

7. To add a new user, type
adduser guest


where guest is the name of new user you want to add.

8. To reset your or anyother users passwd
passwd <user>


The above mentioned way is a great way to reset your password in case you forgot it, or get access to a linux pc if grub is not protected.
Post a Comment