Monday, April 10, 2006

Another way to reset root password

You can reset the root password on any linux machine using this. For that you need to have a bootable distro like knoppix. Boot from the distro type linux single at boot prompt.
#vi /etc/passwd
Next, press the I key, which places the Vi editor in Insert mode. The first line of the passwd file looks like this
now carefully remove x from the middle donot touch: .After that it should look like
save the file by pressing esc key and typing ZZ
Now the next file open it using
#vi /etc/shadow
The first line is scrambled long characters. Change that to
root:::: ie, root followed by four colons.
Save the file by pressing esc and typing ZZ
Now reboot the computer login as normal user.
and change the root password as you want.

No comments: