If you have forgotten root password don't worry, there is an easy way to reset it and create a new one
1. disconnect computer form the network (you will work with root priviledges)
2. boot from your first install CD and press F1 at the first screen, then choose "Rescue System" from the menu and at the prompt type:
#root
You do NOT need a password
3. next at the prompt enter:
# cd /etc
# vi passwd
Next, press "i"
in the passwd file look for root line (something like):
root:x:0:0:root:/root:/bin/bash
delete the "x" after "root:" leave the colons!
After the modification above line shoul look like this:
root::0:0:root:/root:/bin/bash
Save file and exit:
Press ESC then wq and enter
Next edit:
# vi shadow
Press ESC then "x" (x will delete letter under cursor)
change root line from something like:
root:$2a$05$sin5i458ghsdfg8076t5ymp4y;jgslkdbvffd bshmRK:12856:0:10000::::
to
root::::
note four colons left!
Save the file:
ESC next wq
If something went wrong with editing press ESC and next q!
it is q with exclamation mark: "q!"
reboot your computer, log in as your normal user, and from the console window enter:
$ su
# passwd
And set the new root password. Log out as root:
You just set a new root password.
If you have lost user password: lof in as a root and type
#passwd user_name
enter a new user password.
|