1LIMITS.CONF(5) Linux-PAM Manual LIMITS.CONF(5)
2
3
4
6 limits.conf - configuration file for the pam_limits module
7
9 The syntax of the lines is as follows:
10
11 <domain> <type> <item> <value>
12
13 The fields listed above should be filled as follows:
14
15 <domain>
16
17 · a username
18
19 · a groupname, with @group syntax. This should not be confused with
20 netgroups.
21
22 · the wildcard *, for default entry.
23
24 · the wildcard %, for maxlogins limit only, can also be used with
25 %group syntax.
26
27 <type>
28
29 hard
30 for enforcing hard resource limits. These limits are set by the
31 superuser and enforced by the Kernel. The user cannot raise his
32 requirement of system resources above such values.
33
34 soft
35 for enforcing soft resource limits. These limits are ones that
36 the user can move up or down within the permitted range by any
37 pre-exisiting hard limits. The values specified with this token
38 can be thought of as default values, for normal system usage.
39
40 - for enforcing both soft and hard resource limits together.
41
42 Note, if you specify a type of '-' but neglect to supply the item
43 and value fields then the module will never enforce any limits on
44 the specified user/group etc. .
45
46 <item>
47
48 core
49 limits the core file size (KB)
50
51 data
52 maximum data size (KB)
53
54 fsize
55 maximum filesize (KB)
56
57 memlock
58 maximum locked-in-memory address space (KB)
59
60 nofile
61 maximum number of open files
62
63 rss
64 maximum resident set size (KB)
65
66 stack
67 maximum stack size (KB)
68
69 cpu
70 maximum CPU time (minutes)
71
72 nproc
73 maximum number of processes
74
75 as address space limit
76
77 maxlogins
78 maximum number of logins for this user
79
80 maxsyslogins
81 maximum number of logins on system
82
83 priority
84 the priority to run user process with (negative values boost
85 process priority)
86
87 locks
88 maximum locked files (Linux 2.4 and higher)
89
90 sigpending
91 maximum number of pending signals (Linux 2.6 and higher)
92
93 msqqueue
94 maximum memory used by POSIX message queues (bytes) (Linux 2.6
95 and higher)
96
97 nice
98 maximum nice priority allowed to raise to (Linux 2.6.12 and
99 higher)
100
101 rtprio
102 maximum realtime priority allowed for non-privileged processes
103 (Linux 2.6.12 and higher)
104
105 In general, individual limits have priority over group limits, so if
106 you impose no limits for admin group, but one of the members in this
107 group have a limits line, the user will have its limits set according
108 to this line.
109
110 Also, please note that all limit settings are set per login. They are
111 not global, nor are they permanent; existing only for the duration of
112 the session.
113
114 In the limits configuration file, the '#' character introduces a
115 comment - after which the rest of the line is ignored.
116
117 The pam_limits module does its best to report configuration problems
118 found in its configuration file via syslog(3).
119
121 These are some example lines which might be specified in
122 /etc/security/limits.conf.
123
124 * soft core 0
125 * hard rss 10000
126 @student hard nproc 20
127 @faculty soft nproc 20
128 @faculty hard nproc 50
129 ftp hard nproc 0
130 @student - maxlogins 4
131
132
134 pam_limits(8), pam.d(5), pam(8)
135
137 pam_limits was initially written by Cristian Gafton <gafton@redhat.com>
138
139
140
141Linux-PAM Manual 06/22/2006 LIMITS.CONF(5)