Password aging forces the user to change passwords after a system administrator-specified period of time. Password aging can also force a user to keep a password for a certain number of weeks before changing it.

Sample entry from /etc/passwd with password aging installed:

will:5fg63fhD3d,M.z8:9406:12:Will Spencer:/home/will:/bin/bash

Note the comma in the encrypted password field. The characters after
the comma are used by the password aging mechanism.

The password aging characters from above example are:

M.z8

The four characters are interpreted as follows:

1 Maximum number of weeks a password can be used without changing.
2 Minimum number of weeks a password must be used before changing.
3&4 Last time password was changed, in number of weeks since 1970.

Three special cases should be noted:

  1. If the first and second characters are set to ‘..’ the user will be forced to change his/her passwd the next time he/she logs in. The passwd program will then remove the passwd aging characters, and the user will not be subjected to password aging requirements again.
  2. If the third and fourth characters are set to ‘..’ the user will be forced to change his/her passwd the next time he/she logs in. Password aging will then occur as defined by the first and second characters.
  3. If the first character (MAX) is less than the second character (MIN), the user is not allowed to change his/her password. Only root can change that users password.

It should also be noted that the su command does not check the password
aging data. An account with an expired password can be su’d to
without being forced to change the password.

Chart of Password Aging Codes

Password Aging Codes

Character: . / 0 1 2 3 4 5 6 7 8 9
Number: 0 1 2 3 4 5 6 7 8 9 10 11
Character: A B C D E F G H I J K L
Number: 12 13 14 15 16 17 18 19 20 21 22 23
Character: M N O P Q R S T U V W X
Number: 24 25 26 27 28 29 30 31 32 33 34 35
Character: Y Z a b c d e f g h i j
Number: 36 37 38 39 40 41 42 43 44 45 46 47
Character: k l m n o p q r s t u v
Number: 48 49 50 51 52 53 54 55 56 57 58 59
Character: w x y z
Number: 60 61 62 63