]> granicus.if.org Git - linux-pam/blob - modules/pam_unix/pam_unix.8
Relevant BUGIDs:
[linux-pam] / modules / pam_unix / pam_unix.8
1 .\"     Title: pam_unix
2 .\"    Author: 
3 .\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
4 .\"      Date: 09/20/2006
5 .\"    Manual: Linux\-PAM Manual
6 .\"    Source: Linux\-PAM Manual
7 .\"
8 .TH "PAM_UNIX" "8" "09/20/2006" "Linux\-PAM Manual" "Linux\-PAM Manual"
9 .\" disable hyphenation
10 .nh
11 .\" disable justification (adjust text to left margin only)
12 .ad l
13 .SH "NAME"
14 pam_unix \- Module for traditional password authentication
15 .SH "SYNOPSIS"
16 .HP 12
17 \fBpam_unix.so\fR [...]
18 .SH "DESCRIPTION"
19 .PP
20 This is the standard Unix authentication module. It uses standard calls from the system's libraries to retrieve and set account information as well as authentication. Usually this is obtained from the /etc/passwd and the /etc/shadow file as well if shadow is enabled.
21 .PP
22 The account component performs the task of establishing the status of the user's account and password based on the following
23 \fIshadow\fR
24 elements: expire, last_change, max_change, min_change, warn_change. In the case of the latter, it may offer advice to the user on changing their password or, through the
25 \fBPAM_AUTHTOKEN_REQD\fR
26 return, delay giving service to the user until they have established a new password. The entries listed above are documented in the
27 \fBshadow\fR(5)
28 manual page. Should the user's record not contain one or more of these entries, the corresponding
29 \fIshadow\fR
30 check is not performed.
31 .PP
32 The authentication component performs the task of checking the users credentials (password). The default action of this module is to not permit the user access to a service if their official password is blank.
33 .PP
34 A helper binary,
35 \fBunix_chkpwd\fR(8), is provided to check the user's password when it is stored in a read protected database. This binary is very simple and will only check the password of the user invoking it. It is called transparently on behalf of the user by the authenticating component of this module. In this way it is possible for applications like
36 \fBxlock\fR(1)
37 to work without being setuid\-root. The module, by default, will temporarily turn off SIGCHLD handling for the duration of execution of the helper binary. This is generally the right thing to do, as many applications are not prepared to handle this signal from a child they didn't know was
38 \fBfork()\fRd. The
39 \fBnoreap\fR
40 module argument can be used to suppress this temporary shielding and may be needed for use with certain applications.
41 .PP
42 The password component of this module performs the task of updating the user's password.
43 .PP
44 The session component of this module logs when a user logins or leave the system.
45 .PP
46 Remaining arguments, supported by others functions of this module, are silently ignored. Other arguments are logged as errors through
47 \fBsyslog\fR(3).
48 .SH "OPTIONS"
49 .TP 3n
50 \fBdebug\fR
51 Turns on debugging via
52 \fBsyslog\fR(3).
53 .TP 3n
54 \fBaudit\fR
55 A little more extreme than debug.
56 .TP 3n
57 \fBnullok\fR
58 The default action of this module is to not permit the user access to a service if their official password is blank. The
59 \fBnullok\fR
60 argument overrides this default.
61 .TP 3n
62 \fBtry_first_pass\fR
63 Before prompting the user for their password, the module first tries the previous stacked module's password in case that satisfies this module as well.
64 .TP 3n
65 \fBuse_first_pass\fR
66 The argument
67 \fBuse_first_pass\fR
68 forces the module to use a previous stacked modules password and will never prompt the user \- if no password is available or the password is not appropriate, the user will be denied access.
69 .TP 3n
70 \fBnodelay\fR
71 This argument can be used to discourage the authentication component from requesting a delay should the authentication as a whole fail. The default action is for the module to request a delay\-on\-failure of the order of two second.
72 .TP 3n
73 \fBuse_authtok\fR
74 When password changing enforce the module to set the new password to the one provided by a previously stacked
75 \fBpassword\fR
76 module (this is used in the example of the stacking of the
77 \fBpam_cracklib\fR
78 module documented above).
79 .TP 3n
80 \fBnot_set_pass\fR
81 This argument is used to inform the module that it is not to pay attention to/make available the old or new passwords from/to other (stacked) password modules.
82 .TP 3n
83 \fBnis\fR
84 NIS RPC is used for setting new passwords.
85 .TP 3n
86 \fBremember=\fR\fB\fIn\fR\fR
87 The last
88 \fIn\fR
89 passwords for each user are saved in
90 \fI/etc/security/opasswd\fR
91 in order to force password change history and keep the user from alternating between the same password too frequently.
92 .TP 3n
93 \fBshadow\fR
94 Try to maintain a shadow based system.
95 .TP 3n
96 \fBmd5\fR
97 When a user changes their password next, encrypt it with the MD5 algorithm.
98 .TP 3n
99 \fBbigcrypt\fR
100 When a user changes their password next, encrypt it with the DEC C2 algorithm.
101 .TP 3n
102 \fBbroken_shadow\fR
103 Ignore errors reading shadow inforation for users in the account management module.
104 .PP
105 Invalid arguments are logged with
106 \fBsyslog\fR(3).
107 .SH "MODULE SERVICES PROVIDED"
108 .PP
109 All service are supported.
110 .SH "RETURN VALUES"
111 .TP 3n
112 PAM_IGNORE
113 Ignore this module.
114 .SH "EXAMPLES"
115 .PP
116 An example usage for
117 \fI/etc/pam.d/login\fR
118 would be:
119 .sp
120 .RS 3n
121 .nf
122 # Authenticate the user
123 auth       required   pam_unix.so
124 # Ensure users account and password are still active
125 account    required   pam_unix.so
126 # Change the users password, but at first check the strength
127 # with pam_cracklib(8)
128 password   required   pam_cracklib.so retry=3 minlen=6 difok=3
129 password   required   pam_unix.so use_authtok nullok md5
130 session    required   pam_unix.so
131       
132 .fi
133 .RE
134 .sp
135 .SH "SEE ALSO"
136 .PP
137
138 \fBpam.conf\fR(5),
139 \fBpam.d\fR(8),
140 \fBpam\fR(8)
141 .SH "AUTHOR"
142 .PP
143 pam_unix was written by various people.