Recover Root Password - Roshan Kulkarni - IIT Bombay
Recover Root Password

| Home > Articles > Recover Root |

Recover Root Password in Linux

Forgot your Linux root password? If you have physical access to the machine, you can recover it. These are some quick steps to recover your password (assuming GRUB is your bootloader):

How To?

Root Password Vulnerability

Anyone who has physical access to the system can reset the root password of the system. How do you make your system less vulnerable to this?

  1. Disable the boot prompt. So the above 'init' trick won't work.
  2. Disable the "Boot from CD" option in the BIOS. Attacker cannot boot your system from a bootable linux CD now. Thus she cannot get into the "linux single" mode.
  3. Password protect your BIOS, so that no one can change the setting in Step-2 above.
  4. The only way a person can reset your root password now is by physical access to the system motherboard in order to erase the CMOS settings. This is generally done by some jumper settings or DIP switches on the motherboard. Once the CMOS settings are erased, the attacker can change your boot options from the BIOS setup.

The above steps are certainly not foolproof. But they make it much harder to reset the root password.