Sunday, November 23, 2008

Login to Linux without password as root

This is a very interesting fact. There is a method to log in to any Linux OS as root (super user) without a password. Further it is possible to change root password as well. Here is how to do it.

1. When you get the Grub boot loader screen select the linux OS
2. Press 'e'
3. You will be directed to another screen which is similar to Grub boot menu. Locate the entry having the word 'kernal'.
4. Press 'e' again.
5. You will be directed to a screen where you can edit the line having linux os. Type a space and single there.
6. Hit enter. Now you will come back to the Grub screen. Note that Linux Os line now has single attached to it.
7. Press 'b'

Now you will be logged in as root in to a shell.

Type passwd and hit enter. Now you can give a new root password. Enjoy...

No comments: