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.
- Boot your computer until the GRUB screen shows up.
- Press enter so that you stay on the GRUB screen instead of proceeding all the way to a normal boot.
- Select the kernel that you want to boot and press E to edit the line.
- Use the arrow key again to highlight the line that begins with kernel, and press E to edit the kernel parameters.
- Append the number 1 (one) to the end of the line.
- 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.