Archive

Posts Tagged ‘Security’

Recover root Password

August 29, 2008 3 comments

You forgot your root password… Nice work. Now you’ll just have to reinstall the entire operating system. Sadly enough, I’ve seen more than a few people do this. But it’s surprisingly easy to get on the machine and change the password. This doesn’t work in all cases (like if you made a GRUB password and forgot that too), but here’s how you do it in a normal situation.

  1. Boot your computer until the GRUB screen shows up.
  2. Press enter so that you stay on the GRUB screen instead of proceeding all the way to a normal boot. 
  3. Select the kernel that you want to boot and press E to edit the line.
  4. Use the arrow key again to highlight the line that begins with kernel, and press E to edit the kernel parameters.
  5. Append the number 1 (one) to the end of the line.
  6. Press B to boot the system.

The system will boot up in single-user mode and at some point you will see the UNIX prompt:

sh-3.01#

Once here you can run the passwd command and change the password to whatever you like.

sh-3.01# passwd root
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully

Now you can reboot, and the machine will boot up with your new password.

Advertisements
Categories: Security Tags: