Unix Command To Change Password

by on September 28, 2012 · 0 comments· LAST UPDATED September 28, 2013

in , ,

I am a new Unix user at my university/school. In Unix, how do I change my password to safeguard and increase the security of my Unix account?

It is a good idea to change your password every month or at least every four months.
Tutorial details
DifficultyEasy (rss)
Root privilegesNo
Estimated completion time1m
Make sure you use combination of alphabets (upper and lower case characters), numbers, and special characters as a password to safeguard your account. You should choose a password of at least ten characters. Do not write down your username and password. Do not share your password or send anyone via email, even if the email or sysadmin requesting your password seems official. A request for a password via email is very likely a phishing scam.

passwd command syntax

You need to use the Unix passwd command to change your password. The syntax is:


The Unix will prompt you for your old password, ask for a new password, and force you to repeat your new password for verification. Please note that Unix passwords are case sensitive. The above command will change the password only on the computer or server you are currently using. If you are logged on nas01 server the password will only on the nas01 sever and not on nas02 or any other Unix based server/computer.

Sample demo

Animated gif 01: The Unix passwd command demo. Learn how to change your Unix password.

Animated gif 01: The Unix passwd command demo. Learn how to change your Unix password.

For more information please see passwd command man page.

Tweet itFacebook itG+ itDownload PDF versionFound an error/typo on this page?

{ 0 comments… add one now }

Leave a Comment

Tagged as: ,

Previous Faq:

Next Faq: