Change Unix Password

Using a Unix password ensures that your system and all your data are safe from unauthorized access. However, you may encounter security threats which may cause you to change your password. If faced with these threats, you need to learn how to change your Unix password.

Steps to Change Unix Password

  1. Use the “passwd” command to change your Unix password. Once you enter the “passwd” on the command line, a set of fields will appear.
  2. Above the fields, this title will appear on your screen: “Changing local password for [user name]”, where [user name] contains your user name.
  3. Type your old password in the first field.
  4. Type your new password into the second field.
  5. Retype your new password into the third field.

Make sure the new password you typed in the second field and the one you typed in the third field are exactly the same.

Example

Here is an example wherein a user named Sammy is changing his password.

$ passwd

Changing local password for Sammy

Old Password:

New Password:

Retype New Password:

Make sure that your new password is not closely related to any information about you. As a rule, your password should contain at least six characters. Ideally, you can have both letters and numbers in your new password.

After you have changed your password, you can try logging in by typing it. If you think you might forget your new password, write it down where only you can find it.