Cleanup spec
[profile/ivi/pam.git] / modules / pam_succeed_if / pam_succeed_if.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
6 <refentry id='pam_succeed_if'>
7 <!--  Copyright 2003, 2004 Red Hat, Inc. -->
8 <!--  Written by Nalin Dahyabhai &lt;nalin@redhat.com&gt; -->
9
10   <refmeta>
11     <refentrytitle>pam_succeed_if</refentrytitle>
12     <manvolnum>8</manvolnum>
13     <refmiscinfo class='sectdesc'>Linux-PAM</refmiscinfo>
14   </refmeta>
15
16   <refnamediv id='pam_succeed_if-name'>
17     <refname>pam_succeed_if</refname>
18     <refpurpose>test account characteristics</refpurpose>
19   </refnamediv>
20
21
22   <refsynopsisdiv>
23     <cmdsynopsis id='pam_succeed_if-cmdsynopsis'>
24       <command>pam_succeed_if.so</command>
25       <arg choice='opt' rep='repeat'><replaceable>flag</replaceable></arg>
26       <arg choice='opt' rep='repeat'><replaceable>condition</replaceable></arg>
27     </cmdsynopsis>
28   </refsynopsisdiv>
29
30
31   <refsect1 id='pam_succeed_if-description'>
32     <title>DESCRIPTION</title>
33     <para>
34       pam_succeed_if.so is designed to succeed or fail authentication
35       based on characteristics of the account belonging to the user being
36       authenticated. One use is to select whether to load other modules based
37       on this test.
38     </para>
39
40     <para>
41       The module should be given one or more conditions as module arguments,
42       and authentication will succeed only if all of the conditions are met.
43     </para>
44   </refsect1>
45
46   <refsect1 id="pam_succeed_if-options">
47     <title>OPTIONS</title>
48     <para>
49       The following <emphasis>flag</emphasis>s are supported:
50     </para>
51
52     <variablelist>
53       <varlistentry>
54         <term><option>debug</option></term>
55         <listitem>
56           <para>Turns on debugging messages sent to syslog.</para>
57         </listitem>
58       </varlistentry>
59       <varlistentry>
60         <term><option>use_uid</option></term>
61         <listitem>
62           <para>
63             Evaluate conditions using the account of the user whose UID
64             the application is running under instead of the user being
65             authenticated.
66           </para>
67         </listitem>
68       </varlistentry>
69       <varlistentry>
70         <term><option>quiet</option></term>
71         <listitem>
72           <para>Don't log failure or success to the system log.</para>
73         </listitem>
74       </varlistentry>
75       <varlistentry>
76         <term><option>quiet_fail</option></term>
77         <listitem>
78           <para>
79             Don't log failure to the system log.
80           </para>
81         </listitem>
82       </varlistentry>
83       <varlistentry>
84         <term><option>quiet_success</option></term>
85         <listitem>
86           <para>
87             Don't log success to the system log.
88           </para>
89         </listitem>
90       </varlistentry>
91       <varlistentry>
92         <term><option>audit</option></term>
93         <listitem>
94           <para>
95             Log unknown users to the system log.
96           </para>
97         </listitem>
98       </varlistentry>
99     </variablelist>
100
101     <para>
102       <emphasis>Condition</emphasis>s are three words: a field, a test,
103       and a value to test for.
104     </para>
105     <para>
106       Available fields are <emphasis>user</emphasis>,
107       <emphasis>uid</emphasis>, <emphasis>gid</emphasis>,
108       <emphasis>shell</emphasis>, <emphasis>home</emphasis>
109       and <emphasis>service</emphasis>:
110     </para>
111
112     <variablelist>
113       <varlistentry>
114         <term><option>field &lt; number</option></term>
115         <listitem>
116           <para>Field has a value numerically less than number.</para>
117         </listitem>
118       </varlistentry>
119       <varlistentry>
120         <term><option>field &lt;= number</option></term>
121         <listitem>
122           <para>
123             Field has a value numerically less than or equal to number.
124           </para>
125         </listitem>
126       </varlistentry>
127       <varlistentry>
128         <term><option>field eq number</option></term>
129         <listitem>
130           <para>
131             Field has a value numerically equal to number.
132           </para>
133         </listitem>
134       </varlistentry>
135       <varlistentry>
136         <term><option>field &gt;= number</option></term>
137         <listitem>
138           <para>
139             Field has a value numerically greater than or equal to number.
140           </para>
141         </listitem>
142       </varlistentry>
143       <varlistentry>
144         <term><option>field &gt; number</option></term>
145         <listitem>
146           <para>
147             Field has a value numerically greater than number.
148           </para>
149         </listitem>
150       </varlistentry>
151       <varlistentry>
152         <term><option>field ne number</option></term>
153         <listitem>
154           <para>
155             Field has a value numerically different from number.
156           </para>
157         </listitem>
158       </varlistentry>
159       <varlistentry>
160         <term><option>field = string</option></term>
161         <listitem>
162           <para>
163             Field exactly matches the given string.
164           </para>
165         </listitem>
166       </varlistentry>
167       <varlistentry>
168         <term><option>field != string</option></term>
169         <listitem>
170           <para>
171             Field does not match the given string.
172           </para>
173         </listitem>
174       </varlistentry>
175       <varlistentry>
176         <term><option>field =~ glob</option></term>
177         <listitem>
178           <para>Field matches the given glob.</para>
179         </listitem>
180       </varlistentry>
181       <varlistentry>
182         <term><option>field !~ glob</option></term>
183         <listitem>
184           <para>Field does not match the given glob.</para>
185         </listitem>
186       </varlistentry>
187       <varlistentry>
188         <term><option>field in item:item:...</option></term>
189         <listitem>
190           <para>Field is contained in the list of items separated by colons.</para>
191         </listitem>
192       </varlistentry>
193       <varlistentry>
194         <term><option>field notin item:item:...</option></term>
195         <listitem>
196           <para>Field is not contained in the list of items separated by colons.</para>
197         </listitem>
198       </varlistentry>
199       <varlistentry>
200         <term><option>user ingroup group</option></term>
201         <listitem>
202           <para>User is in given group.</para>
203         </listitem>
204       </varlistentry>
205       <varlistentry>
206         <term><option>user notingroup group</option></term>
207         <listitem>
208           <para>User is not in given group.</para>
209         </listitem>
210       </varlistentry>
211       <varlistentry>
212         <term><option>user innetgr netgroup</option></term>
213         <listitem>
214           <para>(user,host) is in given netgroup.</para>
215         </listitem>
216       </varlistentry>
217       <varlistentry>
218         <term><option>user notinnetgr group</option></term>
219         <listitem>
220           <para>(user,host) is not in given netgroup.</para>
221         </listitem>
222       </varlistentry>
223     </variablelist>
224   </refsect1>
225
226   <refsect1 id="pam_succeed_if-types">
227     <title>MODULE TYPES PROVIDED</title>
228     <para>
229       All module types (<option>account</option>, <option>auth</option>,
230       <option>password</option> and <option>session</option>) are provided.
231     </para>
232   </refsect1>
233
234   <refsect1 id='pam_succeed_if-return_values'>
235     <title>RETURN VALUES</title>
236      <variablelist>
237
238         <varlistentry>
239           <term>PAM_SUCCESS</term>
240           <listitem>
241             <para>
242               The condition was true.
243             </para>
244           </listitem>
245         </varlistentry>
246
247         <varlistentry>
248           <term>PAM_AUTH_ERR</term>
249           <listitem>
250             <para>
251               The condition was false.
252             </para>
253           </listitem>
254         </varlistentry>
255
256         <varlistentry>
257           <term>PAM_SERVICE_ERR</term>
258           <listitem>
259             <para>
260               A service error occurred or the arguments can't be
261               parsed correctly.
262             </para>
263           </listitem>
264         </varlistentry>
265     </variablelist>
266   </refsect1>
267
268
269   <refsect1 id='pam_succeed_if-examples'>
270     <title>EXAMPLES</title>
271     <para>
272       To emulate the behaviour of <emphasis>pam_wheel</emphasis>, except
273       there is no fallback to group 0:
274     </para>
275     <programlisting>
276 auth required pam_succeed_if.so quiet user ingroup wheel
277     </programlisting>
278
279     <para>
280       Given that the type matches, only loads the othermodule rule if
281       the UID is over 500. Adjust the number after default to skip
282       several rules.
283     </para>
284     <programlisting>
285 type [default=1 success=ignore] pam_succeed_if.so quiet uid &gt; 500
286 type required othermodule.so arguments...
287     </programlisting>
288   </refsect1>
289
290   <refsect1 id='pam_succeed_if-see_also'>
291     <title>SEE ALSO</title>
292     <para>
293       <citerefentry>
294         <refentrytitle>glob</refentrytitle><manvolnum>7</manvolnum>
295       </citerefentry>,
296       <citerefentry>
297         <refentrytitle>pam</refentrytitle><manvolnum>8</manvolnum>
298       </citerefentry>
299     </para>
300   </refsect1>
301
302   <refsect1 id='pam_succeed_if-author'>
303     <title>AUTHOR</title>
304     <para>Nalin Dahyabhai &lt;nalin@redhat.com&gt;</para>
305   </refsect1>
306 </refentry>