Root password lost

TheChef

New Member
I have a computer running Linux that hasn't been used for a while by anyone but my brother, who swears by Windows, so Linux hasn't been touched in about a year. I decided to boot Linux and change a setting in an area that needed root priveliges, but I have forgotten the password. Because this is Linux I doubt there is much to do but see if I can remember the password, but does anyone know of a solution other than that?
 
You obviously can't retrieve the password (unless you want to try and crack the hash), but you can reset it.

If you boot into single user mode (which is usually runlevel 1), you can just run passwd to reset the password.

To change to runlevel 1, you might be able to just switch on the fly with telinit 1, but I'm not sure. There are other ways, like editing /etc/inittab or using your boot loader (LILO or GRUB, for example) to boot to runlevel 1. Here is a page I found on faqs, should tell you everything you need to know ;)
 
Back
Top