Import Linux-PAM.
[profile/ivi/pam.git] / modules / pam_limits / limits.conf.5
1 .\"     Title: limits.conf
2 .\"    Author: [see the "AUTHOR" section]
3 .\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/>
4 .\"      Date: 06/21/2011
5 .\"    Manual: Linux-PAM Manual
6 .\"    Source: Linux-PAM Manual
7 .\"  Language: English
8 .\"
9 .TH "LIMITS\&.CONF" "5" "06/21/2011" "Linux-PAM Manual" "Linux\-PAM Manual"
10 .\" -----------------------------------------------------------------
11 .\" * (re)Define some macros
12 .\" -----------------------------------------------------------------
13 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14 .\" toupper - uppercase a string (locale-aware)
15 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16 .de toupper
17 .tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
18 \\$*
19 .tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
20 ..
21 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22 .\" SH-xref - format a cross-reference to an SH section
23 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24 .de SH-xref
25 .ie n \{\
26 .\}
27 .toupper \\$*
28 .el \{\
29 \\$*
30 .\}
31 ..
32 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33 .\" SH - level-one heading that works better for non-TTY output
34 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35 .de1 SH
36 .\" put an extra blank line of space above the head in non-TTY output
37 .if t \{\
38 .sp 1
39 .\}
40 .sp \\n[PD]u
41 .nr an-level 1
42 .set-an-margin
43 .nr an-prevailing-indent \\n[IN]
44 .fi
45 .in \\n[an-margin]u
46 .ti 0
47 .HTML-TAG ".NH \\n[an-level]"
48 .it 1 an-trap
49 .nr an-no-space-flag 1
50 .nr an-break-flag 1
51 \." make the size of the head bigger
52 .ps +3
53 .ft B
54 .ne (2v + 1u)
55 .ie n \{\
56 .\" if n (TTY output), use uppercase
57 .toupper \\$*
58 .\}
59 .el \{\
60 .nr an-break-flag 0
61 .\" if not n (not TTY), use normal case (not uppercase)
62 \\$1
63 .in \\n[an-margin]u
64 .ti 0
65 .\" if not n (not TTY), put a border/line under subheading
66 .sp -.6
67 \l'\n(.lu'
68 .\}
69 ..
70 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 .\" SS - level-two heading that works better for non-TTY output
72 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
73 .de1 SS
74 .sp \\n[PD]u
75 .nr an-level 1
76 .set-an-margin
77 .nr an-prevailing-indent \\n[IN]
78 .fi
79 .in \\n[IN]u
80 .ti \\n[SN]u
81 .it 1 an-trap
82 .nr an-no-space-flag 1
83 .nr an-break-flag 1
84 .ps \\n[PS-SS]u
85 \." make the size of the head bigger
86 .ps +2
87 .ft B
88 .ne (2v + 1u)
89 .if \\n[.$] \&\\$*
90 ..
91 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
92 .\" BB/BE - put background/screen (filled box) around block of text
93 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
94 .de BB
95 .if t \{\
96 .sp -.5
97 .br
98 .in +2n
99 .ll -2n
100 .gcolor red
101 .di BX
102 .\}
103 ..
104 .de EB
105 .if t \{\
106 .if "\\$2"adjust-for-leading-newline" \{\
107 .sp -1
108 .\}
109 .br
110 .di
111 .in
112 .ll
113 .gcolor
114 .nr BW \\n(.lu-\\n(.i
115 .nr BH \\n(dn+.5v
116 .ne \\n(BHu+.5v
117 .ie "\\$2"adjust-for-leading-newline" \{\
118 \M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
119 .\}
120 .el \{\
121 \M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
122 .\}
123 .in 0
124 .sp -.5v
125 .nf
126 .BX
127 .in
128 .sp .5v
129 .fi
130 .\}
131 ..
132 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
133 .\" BM/EM - put colored marker in margin next to block of text
134 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
135 .de BM
136 .if t \{\
137 .br
138 .ll -2n
139 .gcolor red
140 .di BX
141 .\}
142 ..
143 .de EM
144 .if t \{\
145 .br
146 .di
147 .ll
148 .gcolor
149 .nr BH \\n(dn
150 .ne \\n(BHu
151 \M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[]
152 .in 0
153 .nf
154 .BX
155 .in
156 .fi
157 .\}
158 ..
159 .\" -----------------------------------------------------------------
160 .\" * set default formatting
161 .\" -----------------------------------------------------------------
162 .\" disable hyphenation
163 .nh
164 .\" disable justification (adjust text to left margin only)
165 .ad l
166 .\" -----------------------------------------------------------------
167 .\" * MAIN CONTENT STARTS HERE *
168 .\" -----------------------------------------------------------------
169 .SH "Name"
170 limits.conf \- configuration file for the pam_limits module
171 .SH "DESCRIPTION"
172 .PP
173 The syntax of the lines is as follows:
174 .PP
175
176 \fI<domain>\fR
177 \fI<type>\fR
178 \fI<item>\fR
179 \fI<value>\fR
180 .PP
181 The fields listed above should be filled as follows:
182 .PP
183 \fB<domain>\fR
184 .RS 4
185 .sp
186 .RS 4
187 .ie n \{\
188 \h'-04'\(bu\h'+03'\c
189 .\}
190 .el \{\
191 .sp -1
192 .IP \(bu 2.3
193 .\}
194 a username
195 .RE
196 .sp
197 .RS 4
198 .ie n \{\
199 \h'-04'\(bu\h'+03'\c
200 .\}
201 .el \{\
202 .sp -1
203 .IP \(bu 2.3
204 .\}
205 a groupname, with
206 \fB@group\fR
207 syntax\&. This should not be confused with netgroups\&.
208 .RE
209 .sp
210 .RS 4
211 .ie n \{\
212 \h'-04'\(bu\h'+03'\c
213 .\}
214 .el \{\
215 .sp -1
216 .IP \(bu 2.3
217 .\}
218 the wildcard
219 \fB*\fR, for default entry\&.
220 .RE
221 .sp
222 .RS 4
223 .ie n \{\
224 \h'-04'\(bu\h'+03'\c
225 .\}
226 .el \{\
227 .sp -1
228 .IP \(bu 2.3
229 .\}
230 the wildcard
231 \fB%\fR, for maxlogins limit only, can also be used with
232 \fB%group\fR
233 syntax\&. If the
234 \fB%\fR
235 wildcard is used alone it is identical to using
236 \fB*\fR
237 with maxsyslogins limit\&. With a group specified after
238 \fB%\fR
239 it limits the total number of logins of all users that are member of the group\&.
240 .RE
241 .sp
242 .RS 4
243 .ie n \{\
244 \h'-04'\(bu\h'+03'\c
245 .\}
246 .el \{\
247 .sp -1
248 .IP \(bu 2.3
249 .\}
250 an uid range specified as
251 \fI<min_uid>\fR\fB:\fR\fI<max_uid>\fR\&. If min_uid is omitted, the match is exact for the max_uid\&. If max_uid is omitted, all uids greater than or equal min_uid match\&.
252 .RE
253 .sp
254 .RS 4
255 .ie n \{\
256 \h'-04'\(bu\h'+03'\c
257 .\}
258 .el \{\
259 .sp -1
260 .IP \(bu 2.3
261 .\}
262 a gid range specified as
263 \fB@\fR\fI<min_gid>\fR\fB:\fR\fI<max_gid>\fR\&. If min_gid is omitted, the match is exact for the max_gid\&. If max_gid is omitted, all gids greater than or equal min_gid match\&. For the exact match all groups including the user\'s supplementary groups are examined\&. For the range matches only the user\'s primary group is examined\&.
264 .RE
265 .sp
266 .RS 4
267 .ie n \{\
268 \h'-04'\(bu\h'+03'\c
269 .\}
270 .el \{\
271 .sp -1
272 .IP \(bu 2.3
273 .\}
274 a gid specified as
275 \fB%:\fR\fI<gid>\fR
276 applicable to maxlogins limit only\&. It limits the total number of logins of all users that are member of the group with the specified gid\&.
277 .RE
278 .RE
279 .PP
280 \fB<type>\fR
281 .RS 4
282 .PP
283 \fBhard\fR
284 .RS 4
285 for enforcing
286 \fBhard\fR
287 resource limits\&. These limits are set by the superuser and enforced by the Kernel\&. The user cannot raise his requirement of system resources above such values\&.
288 .RE
289 .PP
290 \fBsoft\fR
291 .RS 4
292 for enforcing
293 \fBsoft\fR
294 resource limits\&. These limits are ones that the user can move up or down within the permitted range by any pre\-existing
295 \fBhard\fR
296 limits\&. The values specified with this token can be thought of as
297 \fIdefault\fR
298 values, for normal system usage\&.
299 .RE
300 .PP
301 \fB\-\fR
302 .RS 4
303 for enforcing both
304 \fBsoft\fR
305 and
306 \fBhard\fR
307 resource limits together\&.
308 .sp
309 Note, if you specify a type of \'\-\' but neglect to supply the item and value fields then the module will never enforce any limits on the specified user/group etc\&. \&.
310 .RE
311 .RE
312 .PP
313 \fB<item>\fR
314 .RS 4
315 .PP
316 \fBcore\fR
317 .RS 4
318 limits the core file size (KB)
319 .RE
320 .PP
321 \fBdata\fR
322 .RS 4
323 maximum data size (KB)
324 .RE
325 .PP
326 \fBfsize\fR
327 .RS 4
328 maximum filesize (KB)
329 .RE
330 .PP
331 \fBmemlock\fR
332 .RS 4
333 maximum locked\-in\-memory address space (KB)
334 .RE
335 .PP
336 \fBnofile\fR
337 .RS 4
338 maximum number of open files
339 .RE
340 .PP
341 \fBrss\fR
342 .RS 4
343 maximum resident set size (KB) (Ignored in Linux 2\&.4\&.30 and higher)
344 .RE
345 .PP
346 \fBstack\fR
347 .RS 4
348 maximum stack size (KB)
349 .RE
350 .PP
351 \fBcpu\fR
352 .RS 4
353 maximum CPU time (minutes)
354 .RE
355 .PP
356 \fBnproc\fR
357 .RS 4
358 maximum number of processes
359 .RE
360 .PP
361 \fBas\fR
362 .RS 4
363 address space limit (KB)
364 .RE
365 .PP
366 \fBmaxlogins\fR
367 .RS 4
368 maximum number of logins for this user except for this with
369 \fIuid=0\fR
370 .RE
371 .PP
372 \fBmaxsyslogins\fR
373 .RS 4
374 maximum number of all logins on system
375 .RE
376 .PP
377 \fBpriority\fR
378 .RS 4
379 the priority to run user process with (negative values boost process priority)
380 .RE
381 .PP
382 \fBlocks\fR
383 .RS 4
384 maximum locked files (Linux 2\&.4 and higher)
385 .RE
386 .PP
387 \fBsigpending\fR
388 .RS 4
389 maximum number of pending signals (Linux 2\&.6 and higher)
390 .RE
391 .PP
392 \fBmsgqueue\fR
393 .RS 4
394 maximum memory used by POSIX message queues (bytes) (Linux 2\&.6 and higher)
395 .RE
396 .PP
397 \fBnice\fR
398 .RS 4
399 maximum nice priority allowed to raise to (Linux 2\&.6\&.12 and higher) values: [\-20,19]
400 .RE
401 .PP
402 \fBrtprio\fR
403 .RS 4
404 maximum realtime priority allowed for non\-privileged processes (Linux 2\&.6\&.12 and higher)
405 .RE
406 .RE
407 .PP
408 All items support the values
409 \fI\-1\fR,
410 \fIunlimited\fR
411 or
412 \fIinfinity\fR
413 indicating no limit, except for
414 \fBpriority\fR
415 and
416 \fBnice\fR\&.
417 .PP
418 If a hard limit or soft limit of a resource is set to a valid value, but outside of the supported range of the local system, the system may reject the new limit or unexpected behavior may occur\&. If the control value
419 \fIrequired\fR
420 is used, the module will reject the login if a limit could not be set\&.
421 .PP
422 In general, individual limits have priority over group limits, so if you impose no limits for
423 \fIadmin\fR
424 group, but one of the members in this group have a limits line, the user will have its limits set according to this line\&.
425 .PP
426 Also, please note that all limit settings are set
427 \fIper login\fR\&. They are not global, nor are they permanent; existing only for the duration of the session\&.
428 .PP
429 In the
430 \fIlimits\fR
431 configuration file, the \'\fB#\fR\' character introduces a comment \- after which the rest of the line is ignored\&.
432 .PP
433 The pam_limits module does report configuration problems found in its configuration file and errors via
434 \fBsyslog\fR(3)\&.
435 .SH "EXAMPLES"
436 .PP
437 These are some example lines which might be specified in
438 \FC/etc/security/limits\&.conf\F[]\&.
439 .sp
440 .if n \{\
441 .RS 4
442 .\}
443 .fam C
444 .ps -1
445 .nf
446 .if t \{\
447 .sp -1
448 .\}
449 .BB lightgray adjust-for-leading-newline
450 .sp -1
451
452 *               soft    core            0
453 *               hard    nofile          512
454 @student        hard    nproc           20
455 @faculty        soft    nproc           20
456 @faculty        hard    nproc           50
457 ftp             hard    nproc           0
458 @student        \-       maxlogins       4
459 :123            hard    cpu             5000
460 @500:           soft    cpu             10000
461 600:700         hard    locks           10
462     
463 .EB lightgray adjust-for-leading-newline
464 .if t \{\
465 .sp 1
466 .\}
467 .fi
468 .fam
469 .ps +1
470 .if n \{\
471 .RE
472 .\}
473 .SH "SEE ALSO"
474 .PP
475
476 \fBpam_limits\fR(8),
477 \fBpam.d\fR(5),
478 \fBpam\fR(8),
479 \fBgetrlimit\fR(2)
480 \fBgetrlimit\fR(3p)
481 .SH "AUTHOR"
482 .PP
483 pam_limits was initially written by Cristian Gafton <gafton@redhat\&.com>