Solaris Advanced User's Guide

Using a Password

To ensure your system's security, the Solaris operating environment requires you use a password to access your system. Changing your password several times a year helps to ensure that you are the only user with easy access to your account.

Note –

If you believe someone has used your account without your permission, change your password immediately.

When you choose a password, follow these guidelines.

Changing Your Password

To change your personal password, type the passwd command:

$ passwd
passwd:  Changing password for user2
Enter login password: 
New password: 
Re-enter new password: 
passwd (SYSTEM): passwd successfully changed for user2
  1. When the system prompts you for Enter login password:, type your current password.

    If no password is currently assigned to your account, the system skips the Old Password: prompt.

    The system does not echo (display) your password on the screen and thereby prevents other users from discovering your password.

  2. When the system prompts you for New Password:, type your new password.

    Again, the password you type does not echo on the screen.

  3. At the final prompt, Re-enter new password:, type your new password a second time.

    Your system verifies that you typed the password you intended to type.

    If you do not type your password precisely the way you did at the previous prompt, the system refuses to change your password and responds with the following message:

    passwd: They don't match; try again.

    If you receive this message repeatedly, contact your system administrator to get a new password.

    Note –

    Passwords containing fewer than six characters are not allowed. Also, a new password must differ from the old password by at least three characters.

Password Aging

If your system uses password aging (implemented with options to the passwd command), your password can have either a maximum, or a maximum and minimum lifespan. The lifespan of your password is set by your system administrator.

When your password reaches the maturity date, your system prompts you to change your password when you log in. The following message displays.

Your password has expired. Choose a new one.

The system then automatically runs the passwd program and prompts you for a new password.

If, for example, the minimum age of your password has been set for two weeks, and you try to change your password before the minimum life span has elapsed, the following message displays.

Sorry, less than 2 weeks since the last change.

For more information on passwd(1) and password aging, refer to the man Pages(1): User Commands.