Resetting the Password of a user differently

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. See you in the next newsletter. Until then keep exploring Linux.

njoy the simplicity…….


About victimizeit
This is Atul.. working for IBM as a DataStage Developer. I may not be an expert on any particular DataStgae technology, but I'm sure I do know a few things about DB2, AIX, Unix, Windows, and DataBase. In this blog, I'll give out some tips on these subjects. If you find them useful, great, I'll be happy. Thanks for stopping by !!

What is your opinion ?

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: