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       nullok
69           The default action of this module is to not permit the user access
70           to a service if their official password is blank. The nullok
71           argument overrides this default.
72
73       try_first_pass
74           Before prompting the user for their password, the module first
75           tries the previous stacked module's password in case that satisfies
76           this module as well.
77
78       use_first_pass
79           The argument use_first_pass forces the module to use a previous
80           stacked modules password and will never prompt the user - if no
81           password is available or the password is not appropriate, the user
82           will be denied access.
83
84       nodelay
85           This argument can be used to discourage the authentication
86           component from requesting a delay should the authentication as a
87           whole fail. The default action is for the module to request a
88           delay-on-failure of the order of two second.
89
90       use_authtok
91           When password changing enforce the module to set the new password
92           to the one provided by a previously stacked password module (this
93           is used in the example of the stacking of the pam_cracklib module
94           documented below).
95
96       not_set_pass
97           This argument is used to inform the module that it is not to pay
98           attention to/make available the old or new passwords from/to other
99           (stacked) password modules.
100
101       nis
102           NIS RPC is used for setting new passwords.
103
104       remember=n
105           The last n passwords for each user are saved in
106           /etc/security/opasswd in order to force password change history and
107           keep the user from alternating between the same password too
108           frequently. Instead of this option the pam_pwhistory module should
109           be used.
110
111       shadow
112           Try to maintain a shadow based system.
113
114       md5
115           When a user changes their password next, encrypt it with the MD5
116           algorithm.
117
118       bigcrypt
119           When a user changes their password next, encrypt it with the DEC C2
120           algorithm.
121
122       sha256
123           When a user changes their password next, encrypt it with the SHA256
124           algorithm. The SHA256 algorithm must be supported by the crypt(3)
125           function.
126
127       sha512
128           When a user changes their password next, encrypt it with the SHA512
129           algorithm. The SHA512 algorithm must be supported by the crypt(3)
130           function.
131
132       blowfish
133           When a user changes their password next, encrypt it with the
134           blowfish algorithm. The blowfish algorithm must be supported by the
135           crypt(3) function.
136
137       rounds=n
138           Set the optional number of rounds of the SHA256, SHA512 and
139           blowfish password hashing algorithms to n.
140
141       broken_shadow
142           Ignore errors reading shadow information for users in the account
143           management module.
144
145       minlen=n
146           Set a minimum password length of n characters. The max. for DES
147           crypt based passwords are 8 characters.
148
149       no_pass_expiry
150           When set ignore password expiration as defined by the shadow entry
151           of the user. The option has an effect only in case pam_unix was not
152           used for the authentication or it returned authentication failure
153           meaning that other authentication source or method succeeded. The
154           example can be public key authentication in sshd. The module will
155           return PAM_SUCCESS instead of eventual PAM_NEW_AUTHTOK_REQD or
156           PAM_AUTHTOK_EXPIRED.
157
158       Invalid arguments are logged with syslog(3).
159

MODULE TYPES PROVIDED

161       All module types (account, auth, password and session) are provided.
162

RETURN VALUES

164       PAM_IGNORE
165           Ignore this module.
166

EXAMPLES

168       An example usage for /etc/pam.d/login would be:
169
170           # Authenticate the user
171           auth       required   pam_unix.so
172           # Ensure users account and password are still active
173           account    required   pam_unix.so
174           # Change the users password, but at first check the strength
175           # with pam_cracklib(8)
176           password   required   pam_cracklib.so retry=3 minlen=6 difok=3
177           password   required   pam_unix.so use_authtok nullok md5
178           session    required   pam_unix.so
179
180
181

SEE ALSO

183       login.defs(5), pam.conf(5), pam.d(5), pam(8)
184

AUTHOR

186       pam_unix was written by various people.
187
188
189
190Linux-PAM Manual                  04/11/2018                       PAM_UNIX(8)
Impressum