passwd command

Purpose

Changes a user's password.

Syntax

passwd [ User ]

Description

The passwd command sets and changes passwords for users. Use this command to change your own password (all users) or another user's password (padmin only). To change your own password, enter the passwd command. The passwd command prompts the non-padmin user for the old password and then prompts for the new password twice. The password is never displayed on the screen. If the two entries of the new password do not match, the passwd command prompts for the new password again.

Password policy is checked during a password change. Construct locally defined passwords according to the following password restrictions:

Field Description
minother Specifies the minimum number of other characters.
minlen Specifies the minimum number of characters.
maxrepeats Specifies the maximum number of times a single character can be used in a password.
maxage Specifies the maximum age of a password. A password must be changed after a specified amount of time measured in weeks.
maxexpired Specifies the maximum number of weeks beyond the maxage value that a password can be changed by the user.
histexpire Specifies the number of weeks that a user cannot reuse a password.
histsize Specifies the number of previous passwords that the user cannot reuse.

Security

Changing a password other than your own requires prime administrator authority.

Examples

  1. To change the password for user account heerlen, type:
    passwd heerlen
    The user will then be prompted to enter the new password.



Last updated: Wed, November 18, 2020