1PAM_UNIX(8)                    Linux-PAM Manual                    PAM_UNIX(8)
2
3
4

NAME

6       pam_unix - Module for traditional password authentication
7

SYNOPSIS

9       pam_unix.so [...]
10

DESCRIPTION

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. The default encryption hash is taken from the
52       ENCRYPT_METHOD variable from /etc/login.defs
53
54       The session component of this module logs when a user logins or leave
55       the system.
56
57       Remaining arguments, supported by others functions of this module, are
58       silently ignored. Other arguments are logged as errors through
59       syslog(3).
60

OPTIONS

62       debug
63           Turns on debugging via syslog(3).
64
65       audit
66           A little more extreme than debug.
67
68       quiet
69           Turns off informational messages namely messages about session open
70           and close via syslog(3).
71
72       nullok
73           The default action of this module is to not permit the user access
74           to a service if their official password is blank. The nullok
75           argument overrides this default.
76
77       nullresetok
78           Allow users to authenticate with blank password if password reset
79           is enforced even if nullok is not set. If password reset is not
80           required and nullok is not set the authentication with blank
81           password will be denied.
82
83       try_first_pass
84           Before prompting the user for their password, the module first
85           tries the previous stacked module's password in case that satisfies
86           this module as well.
87
88       use_first_pass
89           The argument use_first_pass forces the module to use a previous
90           stacked modules password and will never prompt the user - if no
91           password is available or the password is not appropriate, the user
92           will be denied access.
93
94       nodelay
95           This argument can be used to discourage the authentication
96           component from requesting a delay should the authentication as a
97           whole fail. The default action is for the module to request a
98           delay-on-failure of the order of two second.
99
100       use_authtok
101           When password changing enforce the module to set the new password
102           to the one provided by a previously stacked password module (this
103           is used in the example of the stacking of the pam_cracklib module
104           documented below).
105
106       authtok_type=type
107           This argument can be used to modify the password prompt when
108           changing passwords to include the type of the password. Empty by
109           default.
110
111       nis
112           NIS RPC is used for setting new passwords.
113
114       remember=n
115           The last n passwords for each user are saved in
116           /etc/security/opasswd in order to force password change history and
117           keep the user from alternating between the same password too
118           frequently. The MD5 password hash algorithm is used for storing the
119           old passwords. Instead of this option the pam_pwhistory module
120           should be used.
121
122       shadow
123           Try to maintain a shadow based system.
124
125       md5
126           When a user changes their password next, encrypt it with the MD5
127           algorithm.
128
129       bigcrypt
130           When a user changes their password next, encrypt it with the DEC C2
131           algorithm.
132
133       sha256
134           When a user changes their password next, encrypt it with the SHA256
135           algorithm. The SHA256 algorithm must be supported by the crypt(3)
136           function.
137
138       sha512
139           When a user changes their password next, encrypt it with the SHA512
140           algorithm. The SHA512 algorithm must be supported by the crypt(3)
141           function.
142
143       blowfish
144           When a user changes their password next, encrypt it with the
145           blowfish algorithm. The blowfish algorithm must be supported by the
146           crypt(3) function.
147
148       gost_yescrypt
149           When a user changes their password next, encrypt it with the
150           gost-yescrypt algorithm. The gost-yescrypt algorithm must be
151           supported by the crypt(3) function.
152
153       yescrypt
154           When a user changes their password next, encrypt it with the
155           yescrypt algorithm. The yescrypt algorithm must be supported by the
156           crypt(3) function.
157
158       rounds=n
159           Set the optional number of rounds of the SHA256, SHA512, blowfish,
160           gost-yescrypt, and yescrypt password hashing algorithms to n.
161
162       broken_shadow
163           Ignore errors reading shadow information for users in the account
164           management module.
165
166       minlen=n
167           Set a minimum password length of n characters. The max. for DES
168           crypt based passwords are 8 characters.
169
170       no_pass_expiry
171           When set ignore password expiration as defined by the shadow entry
172           of the user. The option has an effect only in case pam_unix was not
173           used for the authentication or it returned authentication failure
174           meaning that other authentication source or method succeeded. The
175           example can be public key authentication in sshd. The module will
176           return PAM_SUCCESS instead of eventual PAM_NEW_AUTHTOK_REQD or
177           PAM_AUTHTOK_EXPIRED.
178
179       Invalid arguments are logged with syslog(3).
180

MODULE TYPES PROVIDED

182       All module types (account, auth, password and session) are provided.
183

RETURN VALUES

185       PAM_IGNORE
186           Ignore this module.
187

EXAMPLES

189       An example usage for /etc/pam.d/login would be:
190
191           # Authenticate the user
192           auth       required   pam_unix.so
193           # Ensure users account and password are still active
194           account    required   pam_unix.so
195           # Change the user's password, but at first check the strength
196           # with pam_cracklib(8)
197           password   required   pam_cracklib.so retry=3 minlen=6 difok=3
198           password   required   pam_unix.so use_authtok nullok yescrypt
199           session    required   pam_unix.so
200
201
202

SEE ALSO

204       login.defs(5), pam.conf(5), pam.d(5), pam(8)
205

AUTHOR

207       pam_unix was written by various people.
208
209
210
211Linux-PAM Manual                  06/08/2020                       PAM_UNIX(8)
Impressum