Import Linux-PAM.
[profile/ivi/pam.git] / modules / pam_limits / pam_limits.8.xml
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3                    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
4
5 <refentry id='pam_limits'>
6
7   <refmeta>
8     <refentrytitle>pam_limits</refentrytitle>
9     <manvolnum>8</manvolnum>
10     <refmiscinfo class='setdesc'>Linux-PAM Manual</refmiscinfo>
11   </refmeta>
12
13   <refnamediv id='pam_limits-name'>
14     <refname>pam_limits</refname>
15     <refpurpose>
16       PAM module to limit resources
17     </refpurpose>
18   </refnamediv>
19
20 <!-- body begins here -->
21
22   <refsynopsisdiv>
23     <cmdsynopsis id="pam_limits-cmdsynopsis">
24       <command>pam_limits.so</command>
25       <arg choice="opt">
26         conf=<replaceable>/path/to/limits.conf</replaceable>
27       </arg>
28       <arg choice="opt">
29         debug
30       </arg>
31       <arg choice="opt">
32         set_all
33       </arg>
34       <arg choice="opt">
35         utmp_early
36       </arg>
37       <arg choice="opt">
38         noaudit
39       </arg>
40     </cmdsynopsis>
41   </refsynopsisdiv>
42
43
44   <refsect1 id="pam_limits-description">
45     <title>DESCRIPTION</title>
46     <para>
47       The pam_limits PAM module sets limits on the system resources that can be
48       obtained in a user-session. Users of <emphasis>uid=0</emphasis> are affected
49       by this limits, too.
50     </para>
51     <para>
52       By default limits are taken from the <filename>/etc/security/limits.conf</filename>
53       config file. Then individual *.conf files from the <filename>/etc/security/limits.d/</filename>
54       directory are read. The files are parsed one after another in the order of "C" locale.
55       The effect of the individual files is the same as if all the files were
56       concatenated together in the order of parsing.
57       If a config file is explicitly specified with a module option then the
58       files in the above directory are not parsed.
59     </para>
60     <para>
61       The module must not be called by a multithreaded application.
62     </para>
63     <para>
64       If Linux PAM is compiled with audit support the module will report
65       when it denies access based on limit of maximum number of concurrent
66       login sessions.
67     </para>
68   </refsect1>
69
70   <refsect1 id="pam_limits-options">
71     <title>OPTIONS</title>
72     <variablelist>
73       <varlistentry>
74         <term>
75           <option>conf=<replaceable>/path/to/limits.conf</replaceable></option>
76         </term>
77         <listitem>
78           <para>
79             Indicate an alternative limits.conf style configuration file to
80             override the default.
81           </para>
82         </listitem>
83       </varlistentry>
84       <varlistentry>
85         <term>
86           <option>debug</option>
87         </term>
88         <listitem>
89           <para>
90             Print debug information.
91           </para>
92         </listitem>
93       </varlistentry>
94       <varlistentry>
95         <term>
96           <option>set_all</option>
97         </term>
98         <listitem>
99           <para>
100             Set the limits for which no value is specified in the
101             configuration file to the one from the process with the
102             PID 1.
103           </para>
104         </listitem>
105       </varlistentry>
106       <varlistentry>
107         <term>
108           <option>utmp_early</option>
109         </term>
110         <listitem>
111           <para>
112             Some broken applications actually allocate a utmp entry for
113             the user before the user is admitted to the system. If some
114             of the services you are configuring PAM for do this, you can
115             selectively use this module argument to compensate for this
116             behavior and at the same time maintain system-wide consistency
117             with a single limits.conf file.
118           </para>
119         </listitem>
120       </varlistentry>
121       <varlistentry>
122         <term>
123           <option>noaudit</option>
124         </term>
125         <listitem>
126           <para>
127             Do not report exceeded maximum logins count to the audit subsystem.
128           </para>
129         </listitem>
130       </varlistentry>
131     </variablelist>
132   </refsect1>
133
134   <refsect1 id="pam_limits-types">
135     <title>MODULE TYPES PROVIDED</title>
136     <para>
137       Only the <option>session</option> module type is provided.
138     </para>
139   </refsect1>
140
141   <refsect1 id="pam_limits-return_values">
142     <title>RETURN VALUES</title>
143     <variablelist>
144       <varlistentry>
145         <term>PAM_ABORT</term>
146         <listitem>
147            <para>
148              Cannot get current limits.
149           </para>
150         </listitem>
151       </varlistentry>
152       <varlistentry>
153         <term>PAM_IGNORE</term>
154         <listitem>
155            <para>
156              No limits found for this user.
157           </para>
158         </listitem>
159       </varlistentry>
160       <varlistentry>
161         <term>PAM_PERM_DENIED</term>
162         <listitem>
163           <para>
164             New limits could not be set.
165           </para>
166         </listitem>
167       </varlistentry>
168       <varlistentry>
169         <term>PAM_SERVICE_ERR</term>
170         <listitem>
171            <para>
172              Cannot read config file.
173           </para>
174         </listitem>
175       </varlistentry>
176       <varlistentry>
177         <term>PAM_SESSION_ERR</term>
178         <listitem>
179            <para>
180              Error recovering account name.
181           </para>
182         </listitem>
183       </varlistentry>
184       <varlistentry>
185         <term>PAM_SUCCESS</term>
186         <listitem>
187            <para>
188              Limits were changed.
189           </para>
190         </listitem>
191       </varlistentry>
192       <varlistentry>
193         <term>PAM_USER_UNKNOWN</term>
194         <listitem>
195            <para>
196              The user is not known to the system.
197           </para>
198         </listitem>
199       </varlistentry>
200     </variablelist>
201   </refsect1>
202
203   <refsect1 id="pam_limits-files">
204     <title>FILES</title>
205     <variablelist>
206       <varlistentry>
207         <term><filename>/etc/security/limits.conf</filename></term>
208         <listitem>
209           <para>Default configuration file</para>
210         </listitem>
211       </varlistentry>
212     </variablelist>
213   </refsect1>
214
215   <refsect1 id='pam_limits-examples'>
216     <title>EXAMPLES</title>
217     <para>
218       For the services you need resources limits (login for example) put a
219       the following line in <filename>/etc/pam.d/login</filename> as the last
220       line for that service (usually after the pam_unix session line):
221     </para>
222     <programlisting>
223 #%PAM-1.0
224 #
225 # Resource limits imposed on login sessions via pam_limits
226 #
227 session  required  pam_limits.so
228     </programlisting>
229     <para>
230       Replace "login" for each service you are using this module.
231     </para>
232   </refsect1>
233
234   <refsect1 id="pam_limits-see_also">
235     <title>SEE ALSO</title>
236     <para>
237       <citerefentry>
238         <refentrytitle>limits.conf</refentrytitle><manvolnum>5</manvolnum>
239       </citerefentry>,
240       <citerefentry>
241         <refentrytitle>pam.d</refentrytitle><manvolnum>5</manvolnum>
242       </citerefentry>,
243       <citerefentry>
244         <refentrytitle>pam</refentrytitle><manvolnum>8</manvolnum>
245       </citerefentry>.
246     </para>
247   </refsect1>
248
249   <refsect1 id="pam_limits-authors">
250     <title>AUTHORS</title>
251     <para>
252       pam_limits was initially written by Cristian Gafton &lt;gafton@redhat.com&gt;
253     </para>
254   </refsect1>
255 </refentry>