Friday, May 29, 2009

Restoring passwords

Hi All,

Though there are many help(s) given to restoring passwords, I have these days seen in many IRCs, about how to restore a lost password in Linux. This is only for Linux and not for Windows.

Say for example you installed Sabayon(or any other Linux) in your /dev/hda3 partition and finally one day lost your root and user passwords for it: the workaround is as follows:

1. Use a Live CD like Ubuntu or Knoppix.
2. Login to the respective root shells.
3. Create a new folder by giving "mkdir new_folder"(Without the quotes)
4. Next give this command: mount /dev/hda3 new_folder
5. After mount, cd into the same.
6. chroot new_folder

Finally for changing the root password, give the command "passwd" and enter the new password twice.

Thats it.

Enjoy.

Thanks,
Ananth Gouri

No comments:

Post a Comment