xref: /illumos-gate/usr/src/lib/passwdutil/README.SunOS-aging (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1*7c478bd9Sstevel@tonic-gate#
2*7c478bd9Sstevel@tonic-gate# CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate#
4*7c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate# (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate# with the License.
8*7c478bd9Sstevel@tonic-gate#
9*7c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate# and limitations under the License.
13*7c478bd9Sstevel@tonic-gate#
14*7c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate#
20*7c478bd9Sstevel@tonic-gate# CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate#
22*7c478bd9Sstevel@tonic-gate
23*7c478bd9Sstevel@tonic-gate Copyright (c) 2001 by Sun Microsystems, Inc.
24*7c478bd9Sstevel@tonic-gate All rights reserved.
25*7c478bd9Sstevel@tonic-gate
26*7c478bd9Sstevel@tonic-gate ident	"%Z%%M%	%I%	%E% SMI"
27*7c478bd9Sstevel@tonic-gate
28*7c478bd9Sstevel@tonic-gate
29*7c478bd9Sstevel@tonic-gate
30*7c478bd9Sstevel@tonic-gate
31*7c478bd9Sstevel@tonic-gate
32*7c478bd9Sstevel@tonic-gateFrom ALT 2600 FAQ:
33*7c478bd9Sstevel@tonic-gate
34*7c478bd9Sstevel@tonic-gateA-06. What are those weird characters after the comma in my passwd file?
35*7c478bd9Sstevel@tonic-gate
36*7c478bd9Sstevel@tonic-gateThe characters are password aging data.  Password aging forces the
37*7c478bd9Sstevel@tonic-gateuser to change passwords after a system administrator-specified period
38*7c478bd9Sstevel@tonic-gateof time.  Password aging can also force a user to keep a password for
39*7c478bd9Sstevel@tonic-gatea certain number of weeks before changing it.
40*7c478bd9Sstevel@tonic-gate
41*7c478bd9Sstevel@tonic-gate]
42*7c478bd9Sstevel@tonic-gate] Sample entry from /etc/passwd with password aging installed:
43*7c478bd9Sstevel@tonic-gate]
44*7c478bd9Sstevel@tonic-gate] voyager:5fg63fhD3d,M.z8:9406:12:The Voyager:/home/voyager:/bin/bash
45*7c478bd9Sstevel@tonic-gate]
46*7c478bd9Sstevel@tonic-gate
47*7c478bd9Sstevel@tonic-gateNote the comma in the encrypted password field.  The characters after
48*7c478bd9Sstevel@tonic-gatethe comma are used by the password aging mechanism.
49*7c478bd9Sstevel@tonic-gate
50*7c478bd9Sstevel@tonic-gate]
51*7c478bd9Sstevel@tonic-gate] Password aging characters from above example:
52*7c478bd9Sstevel@tonic-gate]
53*7c478bd9Sstevel@tonic-gate] M.z8
54*7c478bd9Sstevel@tonic-gate]
55*7c478bd9Sstevel@tonic-gate
56*7c478bd9Sstevel@tonic-gateThe four characters are interpreted as follows:
57*7c478bd9Sstevel@tonic-gate
58*7c478bd9Sstevel@tonic-gate  1: Maximum number of weeks a password can be used without changing.
59*7c478bd9Sstevel@tonic-gate  2: Minimum number of weeks a password must be used before changing.
60*7c478bd9Sstevel@tonic-gate3& 4: Last time password was changed, in number of weeks since 1970.
61*7c478bd9Sstevel@tonic-gate
62*7c478bd9Sstevel@tonic-gateJV: 3 & 4 are in (low,high), where the number of weeks is (low+high*64).
63*7c478bd9Sstevel@tonic-gate
64*7c478bd9Sstevel@tonic-gate
65*7c478bd9Sstevel@tonic-gateThree special cases should be noted:
66*7c478bd9Sstevel@tonic-gate
67*7c478bd9Sstevel@tonic-gateIf the first and second characters are set to '..' the user will be
68*7c478bd9Sstevel@tonic-gateforced to change his/her passwd the next time he/she logs in.  The
69*7c478bd9Sstevel@tonic-gatepasswd program will then remove the passwd aging characters, and the
70*7c478bd9Sstevel@tonic-gateuser will not be subjected to password aging requirements again.
71*7c478bd9Sstevel@tonic-gate
72*7c478bd9Sstevel@tonic-gateIf the third and fourth characters are set to '..' the user will be
73*7c478bd9Sstevel@tonic-gateforced to change his/her passwd the next time he/she logs in. Password
74*7c478bd9Sstevel@tonic-gateaging will then occur as defined by the first and second characters.
75*7c478bd9Sstevel@tonic-gate
76*7c478bd9Sstevel@tonic-gateIf the first character (MAX) is less than the second character (MIN),
77*7c478bd9Sstevel@tonic-gatethe user is not allowed to change his/her password.  Only root can
78*7c478bd9Sstevel@tonic-gatechange that users password.
79*7c478bd9Sstevel@tonic-gate
80*7c478bd9Sstevel@tonic-gateIt should also be noted that the su command does not check the password
81*7c478bd9Sstevel@tonic-gateaging data.  An account with an expired password can be su'd to
82*7c478bd9Sstevel@tonic-gatewithout being forced to change the password.
83*7c478bd9Sstevel@tonic-gate
84*7c478bd9Sstevel@tonic-gate
85*7c478bd9Sstevel@tonic-gate                        Password Aging Codes
86*7c478bd9Sstevel@tonic-gate+------------------------------------------------------------------------+
87*7c478bd9Sstevel@tonic-gate|                                                                        |
88*7c478bd9Sstevel@tonic-gate| Character:  .  /  0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F  G  H |
89*7c478bd9Sstevel@tonic-gate|    Number:  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 |
90*7c478bd9Sstevel@tonic-gate|                                                                        |
91*7c478bd9Sstevel@tonic-gate| Character:  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  a  b |
92*7c478bd9Sstevel@tonic-gate|    Number: 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
93*7c478bd9Sstevel@tonic-gate|                                                                        |
94*7c478bd9Sstevel@tonic-gate| Character:  c  d  e  f  g  h  i  j  k  l  m  n  o  p  q  r  s  t  u  v |
95*7c478bd9Sstevel@tonic-gate|    Number: 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
96*7c478bd9Sstevel@tonic-gate|                                                                        |
97*7c478bd9Sstevel@tonic-gate| Character:  w  x  y  z                                                 |
98*7c478bd9Sstevel@tonic-gate|    Number: 60 61 62 63                                                 |
99*7c478bd9Sstevel@tonic-gate|                                                                        |
100*7c478bd9Sstevel@tonic-gate+------------------------------------------------------------------------+
101