We have moved to www.dataGenX.net, Keep Learning with us.

Tuesday, June 12, 2012

Resetting the Password of a user differently in NIX

Hi Friends..

In some of the Linux distributions, including Ubuntu, when you go to recovery mode to reset the password of root or any other user, the user's current password would be prompted. To circumvent this, boot with a Live CD of the Linux distribution and edit the /etc/passwd file using vi or any editor of convenience.

As you must be aware, the fields in the file are separated by ':' (colon) character and the second field is the password of the user. In Linux this value is set to 'x' to indicate that the password is stored in /etc/shadow file in encrypted form. Just remove this 'x' character from the file and let the field be empty against the user whose password needs to be reset. Now, reboot this Linux machine and during the booting process hit 'Alt + F1' to open up a console. You would be prompted for the user name to login to. Once the username is entered the shell prompt comes up without requiring any password.

Now you can reset the password without the need to the previous password.

I hope this little Tip will create curiosity in your mind to explore Linux more and you will know more about it. ;-)


njoy the simplicity.......
©Atul Singh


victimizeit.blogspot.com

No comments :

Post a Comment