Imported Upstream version 1.1.6
[platform/upstream/pam.git] / modules / pam_unix / README
1 pam_unix — Module for traditional password authentication
2
3 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
4
5 DESCRIPTION
6
7 This is the standard Unix authentication module. It uses standard calls from
8 the system's libraries to retrieve and set account information as well as
9 authentication. Usually this is obtained from the /etc/passwd and the /etc/
10 shadow file as well if shadow is enabled.
11
12 The account component performs the task of establishing the status of the
13 user's account and password based on the following shadow elements: expire,
14 last_change, max_change, min_change, warn_change. In the case of the latter, it
15 may offer advice to the user on changing their password or, through the
16 PAM_AUTHTOKEN_REQD return, delay giving service to the user until they have
17 established a new password. The entries listed above are documented in the
18 shadow(5) manual page. Should the user's record not contain one or more of
19 these entries, the corresponding shadow check is not performed.
20
21 The authentication component performs the task of checking the users
22 credentials (password). The default action of this module is to not permit the
23 user access to a service if their official password is blank.
24
25 A helper binary, unix_chkpwd(8), is provided to check the user's password when
26 it is stored in a read protected database. This binary is very simple and will
27 only check the password of the user invoking it. It is called transparently on
28 behalf of the user by the authenticating component of this module. In this way
29 it is possible for applications like xlock(1) to work without being
30 setuid-root. The module, by default, will temporarily turn off SIGCHLD handling
31 for the duration of execution of the helper binary. This is generally the right
32 thing to do, as many applications are not prepared to handle this signal from a
33 child they didn't know was fork()d. The noreap module argument can be used to
34 suppress this temporary shielding and may be needed for use with certain
35 applications.
36
37 The password component of this module performs the task of updating the user's
38 password.
39
40 The session component of this module logs when a user logins or leave the
41 system.
42
43 Remaining arguments, supported by others functions of this module, are silently
44 ignored. Other arguments are logged as errors through syslog(3).
45
46 OPTIONS
47
48 debug
49
50     Turns on debugging via syslog(3).
51
52 audit
53
54     A little more extreme than debug.
55
56 nullok
57
58     The default action of this module is to not permit the user access to a
59     service if their official password is blank. The nullok argument overrides
60     this default.
61
62 try_first_pass
63
64     Before prompting the user for their password, the module first tries the
65     previous stacked module's password in case that satisfies this module as
66     well.
67
68 use_first_pass
69
70     The argument use_first_pass forces the module to use a previous stacked
71     modules password and will never prompt the user - if no password is
72     available or the password is not appropriate, the user will be denied
73     access.
74
75 nodelay
76
77     This argument can be used to discourage the authentication component from
78     requesting a delay should the authentication as a whole fail. The default
79     action is for the module to request a delay-on-failure of the order of two
80     second.
81
82 use_authtok
83
84     When password changing enforce the module to set the new password to the
85     one provided by a previously stacked password module (this is used in the
86     example of the stacking of the pam_cracklib module documented below).
87
88 not_set_pass
89
90     This argument is used to inform the module that it is not to pay attention
91     to/make available the old or new passwords from/to other (stacked) password
92     modules.
93
94 nis
95
96     NIS RPC is used for setting new passwords.
97
98 remember=n
99
100     The last n passwords for each user are saved in /etc/security/opasswd in
101     order to force password change history and keep the user from alternating
102     between the same password too frequently. Instead of this option the
103     pam_pwhistory module should be used.
104
105 shadow
106
107     Try to maintain a shadow based system.
108
109 md5
110
111     When a user changes their password next, encrypt it with the MD5 algorithm.
112
113 bigcrypt
114
115     When a user changes their password next, encrypt it with the DEC C2
116     algorithm.
117
118 sha256
119
120     When a user changes their password next, encrypt it with the SHA256
121     algorithm. If the SHA256 algorithm is not known to the crypt(3) function,
122     fall back to MD5.
123
124 sha512
125
126     When a user changes their password next, encrypt it with the SHA512
127     algorithm. If the SHA512 algorithm is not known to the crypt(3) function,
128     fall back to MD5.
129
130 blowfish
131
132     When a user changes their password next, encrypt it with the blowfish
133     algorithm. If the blowfish algorithm is not known to the crypt(3) function,
134     fall back to MD5.
135
136 rounds=n
137
138     Set the optional number of rounds of the SHA256, SHA512 and blowfish
139     password hashing algorithms to n.
140
141 broken_shadow
142
143     Ignore errors reading shadow information for users in the account
144     management module.
145
146 minlen=n
147
148     Set a minimum password length of n characters. The max. for DES crypt based
149     passwords are 8 characters.
150
151 Invalid arguments are logged with syslog(3).
152
153 EXAMPLES
154
155 An example usage for /etc/pam.d/login would be:
156
157 # Authenticate the user
158 auth       required   pam_unix.so
159 # Ensure users account and password are still active
160 account    required   pam_unix.so
161 # Change the users password, but at first check the strength
162 # with pam_cracklib(8)
163 password   required   pam_cracklib.so retry=3 minlen=6 difok=3
164 password   required   pam_unix.so use_authtok nullok md5
165 session    required   pam_unix.so
166
167
168 AUTHOR
169
170 pam_unix was written by various people.
171