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