]> 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 <command>xlock</command> to work without
71       being setuid-root. The module, by default, will temporarily turn
72       off SIGCHLD handling for the duration of execution of the helper
73       binary. This is generally the right thing to do, as many applications
74       are not prepared to handle this signal from a child they didn't know
75       was <function>fork()</function>d. The <option>noreap</option> module
76       argument can be used to suppress this temporary shielding and may be
77       needed for use with certain applications.
78     </para>
79
80     <para>
81       The password component of this module performs the task of updating
82       the user's password.
83     </para>
84
85     <para>
86       The session component of this module logs when a user logins 
87       or leave the system.
88     </para>
89
90     <para>
91       Remaining arguments, supported by others functions of this
92       module, are silently ignored. Other arguments are logged as
93       errors through <citerefentry>
94       <refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum>
95       </citerefentry>.
96     </para>
97   </refsect1>
98
99   <refsect1 id="pam_unix-options">
100
101     <title>OPTIONS</title>
102     <variablelist>
103       <varlistentry>
104         <term>
105           <option>debug</option>
106         </term>
107         <listitem>
108           <para>
109             Turns on debugging via
110             <citerefentry>
111               <refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum>
112             </citerefentry>.
113           </para>
114         </listitem>
115       </varlistentry>
116
117       <varlistentry>
118         <term>
119           <option>audit</option>
120         </term>
121         <listitem>
122           <para>
123             A little more extreme than debug.
124           </para>
125         </listitem>
126       </varlistentry>
127
128       <varlistentry>
129         <term>
130           <option>nullok</option>
131         </term>
132         <listitem>
133           <para>
134             The default action of this module is to not permit the
135             user access to a service if their official password is blank.
136             The <option>nullok</option> argument overrides this default.
137           </para>
138         </listitem>
139       </varlistentry>
140       <varlistentry>
141         <term>
142           <option>try_first_pass</option>
143         </term>
144         <listitem>
145           <para>
146             Before prompting the user for their password, the module first
147             tries the previous stacked module's password in case that
148             satisfies this module as well.
149           </para>
150         </listitem>
151       </varlistentry>
152       <varlistentry>
153         <term>
154           <option>use_first_pass</option>
155         </term>
156         <listitem>
157           <para>
158             The argument <option>use_first_pass</option> forces the module
159             to use a previous stacked modules password and will never prompt
160             the user - if no password is available or the password is not
161             appropriate, the user will be denied access.
162           </para>
163         </listitem>
164       </varlistentry>
165       <varlistentry>
166         <term>
167           <option>nodelay</option>
168         </term>
169         <listitem>
170           <para>
171             This argument can be used to discourage the authentication
172             component from requesting a delay should the authentication
173             as a whole fail. The default action is for the module to
174             request a delay-on-failure of the order of two second.
175           </para>
176         </listitem>
177       </varlistentry>
178       <varlistentry>
179         <term>
180           <option>use_authtok</option>
181         </term>
182         <listitem>
183           <para>
184             When password changing enforce the module to set the new
185             password to the one provided by a previously stacked
186             <option>password</option> module (this is used in the
187             example of the stacking of the <command>pam_cracklib</command>
188             module documented above).
189           </para>
190         </listitem>
191       </varlistentry>
192       <varlistentry>
193         <term>
194           <option>not_set_pass</option>
195         </term>
196         <listitem>
197           <para>
198             This argument is used to inform the module that it is not to
199             pay attention to/make available the old or new passwords from/to
200             other (stacked) password modules.
201           </para>
202         </listitem>
203       </varlistentry>
204       <varlistentry>
205         <term>
206           <option>nis</option>
207         </term>
208         <listitem>
209           <para>
210             NIS RPC is used for setting new passwords.
211           </para>
212         </listitem>
213       </varlistentry>
214       <varlistentry>
215         <term>
216           <option>remember=<replaceable>n</replaceable></option>
217         </term>
218         <listitem>
219           <para>
220             The last <replaceable>n</replaceable> passwords for each
221             user are saved in <filename>/etc/security/opasswd</filename>
222             in order to force password change history and keep the user
223             from alternating between the same password too frequently.
224           </para>
225         </listitem>
226       </varlistentry>
227       <varlistentry>
228         <term>
229           <option>shadow</option>
230         </term>
231         <listitem>
232           <para>
233             Try to maintain a shadow based system.
234           </para>
235         </listitem>
236       </varlistentry>
237       <varlistentry>
238         <term>
239           <option>md5</option>
240         </term>
241         <listitem>
242           <para>
243             When a user changes their password next, encrypt
244             it with the MD5 algorithm.
245           </para>
246         </listitem>
247       </varlistentry>
248       <varlistentry>
249         <term>
250           <option>bigcrypt</option>
251         </term>
252         <listitem>
253           <para>
254             When a user changes their password next,
255             encrypt it with the DEC C2 algorithm.
256           </para>
257         </listitem>
258       </varlistentry>
259       <varlistentry>
260         <term>
261           <option>broken_shadow</option>
262         </term>
263         <listitem>
264           <para>
265             Ignore errors reading shadow inforation for
266             users in the account management module.
267           </para>
268         </listitem>
269       </varlistentry>
270     </variablelist>
271     <para>
272       Invalid arguments are logged with  <citerefentry>
273       <refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum>
274       </citerefentry>.
275     </para>
276   </refsect1>
277
278   <refsect1 id="pam_unix-services">
279     <title>MODULE SERVICES PROVIDED</title>
280     <para>
281       All service are supported.
282     </para>
283   </refsect1>
284
285   <refsect1 id='pam_unix-return_values'>
286     <title>RETURN VALUES</title>
287     <variablelist>
288       <varlistentry>
289         <term>PAM_IGNORE</term>
290         <listitem>
291           <para>
292             Ignore this module.
293           </para>
294         </listitem>
295       </varlistentry>
296     </variablelist>
297      </refsect1>
298
299   <refsect1 id='pam_unix-examples'>
300     <title>EXAMPLES</title>
301     <para>
302       An example usage for <filename>/etc/pam.d/login</filename>
303       would be:
304       <programlisting>
305 # Authenticate the user
306 auth       required   pam_unix.so
307 # Ensure users account and password are still active
308 account    required   pam_unix.so
309 # Change the users password, but at first check the strength
310 # with pam_cracklib(8)
311 password   required   pam_cracklib.so retry=3 minlen=6 difok=3
312 password   required   pam_unix.so use_authtok nullok md5
313 session    required   pam_unix.so
314       </programlisting>
315     </para>
316   </refsect1>
317
318   <refsect1 id='pam_unix-see_also'>
319     <title>SEE ALSO</title>
320     <para>
321       <citerefentry>
322         <refentrytitle>pam.conf</refentrytitle><manvolnum>5</manvolnum>
323       </citerefentry>,
324       <citerefentry>
325         <refentrytitle>pam.d</refentrytitle><manvolnum>8</manvolnum>
326       </citerefentry>,
327       <citerefentry>
328         <refentrytitle>pam</refentrytitle><manvolnum>8</manvolnum>
329       </citerefentry>
330     </para>
331   </refsect1>
332
333   <refsect1 id='pam_unix-author'>
334     <title>AUTHOR</title>
335       <para>
336         pam_unix was written by various people.
337       </para>
338   </refsect1>
339
340 </refentry>