| Reset Your Lost Root Password |
|
|
|
| Written by Peter |
|
At the prompt type:
# vi passwd
root:x:0:0:root:/root:/bin/bash 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: root::0:0:root:/root:/bin/bash Now, save the file and exit by pressing ESC then "wq" and "enter".
edit the "shadow" file 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 this: root:::: *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!".
$ 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! Addendum. If you have lost user password: log in as a root and type #passwd user_name enter a new user password. |
| Last Updated on Monday, 14 July 2008 17:45 |



