Reset Your Lost Root Password
Novell Cool Solutions: Trench
By Kory Sonnier
Digg This -
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
It's 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.
At the prompt type:
*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 key "x"
After the modification above, the line should look like this:
Now, save the file and exit by pressing ESC then "wq" and "enter".
Now we're going to edit the "shadow" file.
edit the "shadow" fileNext edit:
# vi shadow
Press ESC then "x" (x will delete letter under cursor)
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:
$ su # passwd
And here you'll set the new root password.
Log out of root, and in as your normal user, and you're done!
If you have lost user password: log in as a root and type
enter a new user password.
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com