| Reset Your Lost Root Password|
Posted: 25 Jul 2005
If you have forgotten root password don't worry, there is an easy way to
reset it and create a new one
let's get to it
important to disconnect your computer from the network because you will be
working with root privileges. This inherently makes your computer temporarily
more susceptible to hacks.
boot from the install CDBoot from your first install CD and press F1 at
the first screen. Then choose "Rescue System" from the menu.
*note* - You do NOT need a password.
edit the "passwd" fileAt the next prompt, enter:
# cd /etc
# vi passwd
scroll down to the "root" line.
In the passwd file look
for root line. It should looks something like this:
Delete the "x" after "root:". It's
important to leave the colons.
To delete letter under the cursor press
ESC key and "x" -> so you are deleting letter "x" by pressing sequence ESC
After the modification above, the line should look like
Now, save the file and exit by
pressing ESC then "wq" and "enter".
Now we're going to edit the "shadow"
edit the "shadow" fileNext edit:
# vi shadow
Press ESC then "x" (x will delete letter under
change root line from something like:
*note* - four colons should be left!
Save the file
by pressing ESC and "wq".
If something goes wrong during the editing
process, press ESC followed by "q!".
Log out, reboot, set your new passwordReboot your computer, log in as
your normal user, and from the console window enter:
And here you'll set the new root password.
Log out of
root, and in as your normal user, and you're done!
you have lost user password: log in as a root and type
enter a new user password.