Friday, July 29, 2011

Root Password Recovery

In Grub menu press e to edit the entry.
Use the arrow keys to go to the line that starts with linux and then press End to go to the end of this line. First add a space followed by init=/bin/bash rw

Press Ctrl-x to boot. The system will boot the kernel and run /bin/bash instead of its standard init. This will allow us gain root privileges without password.

At the prompt type passwd and enter your new root passwd ( twice ). After this type reboot and press Enter.


  1. In the screenie there is an underscore after init=/bin/bash rw_

    Which is correct? With or without?

  2. The underscore is just the cursor...
    Which is correct ?
    This one : init=/bin/bash rw

  3. Isn't this rather serious for security? I mean root access by just changing the GRUB might make it easier for intruders.

  4. @Chathranga Ranasingha
    Yes, but you must have physical access to your computer.

  5. @Eric (PREVIOUS POST):
    Phooey! And I thought my data was safe from my cousin XD. Guess I should pasword protect my case files :).

    Informative Post Though, Thanks. :).