]> granicus.if.org Git - linux-pam/blob - modules/pam_unix/pam_unix.8.xml
Relevant BUGIDs:
[linux-pam] / modules / pam_unix / pam_unix.8.xml
1 <?xml version="1.0" encoding='UTF-8'?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3         "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
4
5 <refentry id="pam_unix">
6
7   <refmeta>
8     <refentrytitle>pam_unix</refentrytitle>
9     <manvolnum>8</manvolnum>
10     <refmiscinfo class="sectdesc">Linux-PAM Manual</refmiscinfo>
11   </refmeta>
12
13   <refnamediv id="pam_unix-name">
14     <refname>pam_unix</refname>
15     <refpurpose>Module for traditional password authentication</refpurpose>
16   </refnamediv>
17
18   <refsynopsisdiv>
19     <cmdsynopsis id="pam_unix-cmdsynopsis">
20       <command>pam_unix.so</command>
21       <arg choice="opt">
22         ...
23       </arg>
24     </cmdsynopsis>
25   </refsynopsisdiv>
26
27   <refsect1 id="pam_unix-description">
28
29     <title>DESCRIPTION</title>
30
31     <para>
32       This is the standard Unix authentication module. It uses standard
33       calls from the system's libraries to retrieve and set account
34       information as well as authentication. Usually this is obtained
35       from the /etc/passwd and the /etc/shadow file as well if shadow is
36       enabled.
37     </para>
38
39     <para>
40       The account component performs the task of establishing the status
41       of the user's account and password based on the following
42       <emphasis>shadow</emphasis> elements: expire, last_change, max_change,
43       min_change, warn_change. In the case of the latter, it may offer advice
44       to the user on changing their password or, through the
45       <emphasis remap='B'>PAM_AUTHTOKEN_REQD</emphasis> return, delay
46       giving service to the user until they have established a new password.
47       The entries listed above are documented in the <citerefentry>
48       <refentrytitle>shadow</refentrytitle><manvolnum>5</manvolnum>
49       </citerefentry> manual page. Should the user's record not contain
50       one or more of these entries, the corresponding
51       <emphasis>shadow</emphasis> check is not performed.
52     </para>
53
54     <para>
55       The authentication component performs the task of checking the
56       users credentials (password). The default action of this module
57       is to not permit the user access to a service if their official
58       password is blank.
59     </para>
60
61     <para>
62       A helper binary, <citerefentry>
63       <refentrytitle>unix_chkpwd</refentrytitle><manvolnum>8</manvolnum>
64       </citerefentry>, is provided
65       to check the user's password when it is stored in a read
66       protected database. This binary is very simple and will only
67       check the password of the user invoking it. It is called
68       transparently on behalf of the user by the authenticating
69       component of this module. In this way it is possible
70       for applications like <citerefentry>
71       <refentrytitle>xlock</refentrytitle><manvolnum>1</manvolnum>
72       </citerefentry> to work without
73       being setuid-root. The module, by default, will temporarily turn
74       off SIGCHLD handling for the duration of execution of the helper
75       binary. This is generally the right thing to do, as many applications
76       are not prepared to handle this signal from a child they didn't know
77       was <function>fork()</function>d. The <option>noreap</option> module
78       argument can be used to suppress this temporary shielding and may be
79       needed for use with certain applications.
80     </para>
81
82     <para>
83       The password component of this module performs the task of updating
84       the user's password.
85     </para>
86
87     <para>
88       The session component of this module logs when a user logins 
89       or leave the system.
90     </para>
91
92     <para>
93       Remaining arguments, supported by others functions of this
94       module, are silently ignored. Other arguments are logged as
95       errors through <citerefentry>
96       <refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum>
97       </citerefentry>.
98     </para>
99   </refsect1>
100
101   <refsect1 id="pam_unix-options">
102
103     <title>OPTIONS</title>
104     <variablelist>
105       <varlistentry>
106         <term>
107           <option>debug</option>
108         </term>
109         <listitem>
110           <para>
111             Turns on debugging via
112             <citerefentry>
113               <refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum>
114             </citerefentry>.
115           </para>
116         </listitem>
117       </varlistentry>
118
119       <varlistentry>
120         <term>
121           <option>audit</option>
122         </term>
123         <listitem>
124           <para>
125             A little more extreme than debug.
126           </para>
127         </listitem>
128       </varlistentry>
129
130       <varlistentry>
131         <term>
132           <option>nullok</option>
133         </term>
134         <listitem>
135           <para>
136             The default action of this module is to not permit the
137             user access to a service if their official password is blank.
138             The <option>nullok</option> argument overrides this default.
139           </para>
140         </listitem>
141       </varlistentry>
142       <varlistentry>
143         <term>
144           <option>try_first_pass</option>
145         </term>
146         <listitem>
147           <para>
148             Before prompting the user for their password, the module first
149             tries the previous stacked module's password in case that
150             satisfies this module as well.
151           </para>
152         </listitem>
153       </varlistentry>
154       <varlistentry>
155         <term>
156           <option>use_first_pass</option>
157         </term>
158         <listitem>
159           <para>
160             The argument <option>use_first_pass</option> forces the module
161             to use a previous stacked modules password and will never prompt
162             the user - if no password is available or the password is not
163             appropriate, the user will be denied access.
164           </para>
165         </listitem>
166       </varlistentry>
167       <varlistentry>
168         <term>
169           <option>nodelay</option>
170         </term>
171         <listitem>
172           <para>
173             This argument can be used to discourage the authentication
174             component from requesting a delay should the authentication
175             as a whole fail. The default action is for the module to
176             request a delay-on-failure of the order of two second.
177           </para>
178         </listitem>
179       </varlistentry>
180       <varlistentry>
181         <term>
182           <option>use_authtok</option>
183         </term>
184         <listitem>
185           <para>
186             When password changing enforce the module to set the new
187             password to the one provided by a previously stacked
188             <option>password</option> module (this is used in the
189             example of the stacking of the <command>pam_cracklib</command>
190             module documented above).
191           </para>
192         </listitem>
193       </varlistentry>
194       <varlistentry>
195         <term>
196           <option>not_set_pass</option>
197         </term>
198         <listitem>
199           <para>
200             This argument is used to inform the module that it is not to
201             pay attention to/make available the old or new passwords from/to
202             other (stacked) password modules.
203           </para>
204         </listitem>
205       </varlistentry>
206       <varlistentry>
207         <term>
208           <option>nis</option>
209         </term>
210         <listitem>
211           <para>
212             NIS RPC is used for setting new passwords.
213           </para>
214         </listitem>
215       </varlistentry>
216       <varlistentry>
217         <term>
218           <option>remember=<replaceable>n</replaceable></option>
219         </term>
220         <listitem>
221           <para>
222             The last <replaceable>n</replaceable> passwords for each
223             user are saved in <filename>/etc/security/opasswd</filename>
224             in order to force password change history and keep the user
225             from alternating between the same password too frequently.
226           </para>
227         </listitem>
228       </varlistentry>
229       <varlistentry>
230         <term>
231           <option>shadow</option>
232         </term>
233         <listitem>
234           <para>
235             Try to maintain a shadow based system.
236           </para>
237         </listitem>
238       </varlistentry>
239       <varlistentry>
240         <term>
241           <option>md5</option>
242         </term>
243         <listitem>
244           <para>
245             When a user changes their password next, encrypt
246             it with the MD5 algorithm.
247           </para>
248         </listitem>
249       </varlistentry>
250       <varlistentry>
251         <term>
252           <option>bigcrypt</option>
253         </term>
254         <listitem>
255           <para>
256             When a user changes their password next,
257             encrypt it with the DEC C2 algorithm.
258           </para>
259         </listitem>
260       </varlistentry>
261       <varlistentry>
262         <term>
263           <option>broken_shadow</option>
264         </term>
265         <listitem>
266           <para>
267             Ignore errors reading shadow inforation for
268             users in the account management module.
269           </para>
270         </listitem>
271       </varlistentry>
272     </variablelist>
273     <para>
274       Invalid arguments are logged with  <citerefentry>
275       <refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum>
276       </citerefentry>.
277     </para>
278   </refsect1>
279
280   <refsect1 id="pam_unix-services">
281     <title>MODULE SERVICES PROVIDED</title>
282     <para>
283       All service are supported.
284     </para>
285   </refsect1>
286
287   <refsect1 id='pam_unix-return_values'>
288     <title>RETURN VALUES</title>
289     <variablelist>
290       <varlistentry>
291         <term>PAM_IGNORE</term>
292         <listitem>
293           <para>
294             Ignore this module.
295           </para>
296         </listitem>
297       </varlistentry>
298     </variablelist>
299      </refsect1>
300
301   <refsect1 id='pam_unix-examples'>
302     <title>EXAMPLES</title>
303     <para>
304       An example usage for <filename>/etc/pam.d/login</filename>
305       would be:
306       <programlisting>
307 # Authenticate the user
308 auth       required   pam_unix.so
309 # Ensure users account and password are still active
310 account    required   pam_unix.so
311 # Change the users password, but at first check the strength
312 # with pam_cracklib(8)
313 password   required   pam_cracklib.so retry=3 minlen=6 difok=3
314 password   required   pam_unix.so use_authtok nullok md5
315 session    required   pam_unix.so
316       </programlisting>
317     </para>
318   </refsect1>
319
320   <refsect1 id='pam_unix-see_also'>
321     <title>SEE ALSO</title>
322     <para>
323       <citerefentry>
324         <refentrytitle>pam.conf</refentrytitle><manvolnum>5</manvolnum>
325       </citerefentry>,
326       <citerefentry>
327         <refentrytitle>pam.d</refentrytitle><manvolnum>8</manvolnum>
328       </citerefentry>,
329       <citerefentry>
330         <refentrytitle>pam</refentrytitle><manvolnum>8</manvolnum>
331       </citerefentry>
332     </para>
333   </refsect1>
334
335   <refsect1 id='pam_unix-author'>
336     <title>AUTHOR</title>
337       <para>
338         pam_unix was written by various people.
339       </para>
340   </refsect1>
341
342 </refentry>