Debian Codegraph @

upstream/opensuse-tumbleweed/man8/pam_limits.8

raw
1 '\" t
2 .\" Title: pam_limits
3 .\" Author: [see the "AUTHORS" section]
4 .\" Generator: DocBook XSL Stylesheets v1.79.2 <http://docbook.sf.net/>
5 .\" Date: 05/26/2026
6 .\" Manual: Linux-PAM Manual
7 .\" Source: Linux-PAM
8 .\" Language: English
9 .\"
10 .TH "PAM_LIMITS" "8" "05/26/2026" "Linux\-PAM" "Linux\-PAM Manual"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 pam_limits \- PAM module to limit resources
32 .SH "SYNOPSIS"
33 .HP \w'\fBpam_limits\&.so\fR\ 'u
34 \fBpam_limits\&.so\fR [conf=\fI/path/to/limits\&.conf\fR] [debug] [set_all] [utmp_early] [noaudit]
35 .SH "DESCRIPTION"
36 .PP
37 The pam_limits PAM module sets limits on the system resources that can be obtained in a user\-session\&. Users of
38 \fIuid=0\fR
39 are affected by this limits, too\&.
40 .PP
41 By default limits are taken from the
42 /etc/security/limits\&.conf
43 config file or, if that one is not present, the file
44 /usr/etc/security/limits\&.conf\&. Then individual
45 *\&.conf
46 files from the
47 /etc/security/limits\&.d/
48 and
49 /usr/etc/security/limits\&.d
50 directories are read\&. If
51 /etc/security/limits\&.d/@filename@\&.conf
52 exists, then
53 /usr/etc/security/limits\&.d/@filename@\&.conf
54 will not be used\&. All
55 limits\&.d/*\&.conf
56 files are sorted by their
57 @filename@\&.conf
58 in lexicographic order regardless of which of the directories they reside in\&. The effect of the individual files is the same as if all the files were concatenated together in the order of parsing\&. If a config file is explicitly specified with the
59 \fBconfig\fR
60 option the files in the above directories are not parsed\&.
61 .PP
62 The module must not be called by a multithreaded application\&.
63 .PP
64 If Linux PAM is compiled with audit support the module will report when it denies access based on limit of maximum number of concurrent login sessions\&.
65 .SH "OPTIONS"
66 .PP
67 conf=/path/to/limits\&.conf
68 .RS 4
69 Indicate an alternative limits\&.conf style configuration file to override the default\&.
70 .RE
71 .PP
72 debug
73 .RS 4
74 Print debug information\&.
75 .RE
76 .PP
77 set_all
78 .RS 4
79 Set the limits for which no value is specified in the configuration file to the one from the process with the PID 1\&. Please note that if the init process is systemd these limits will not be the kernel default limits and this option should not be used\&.
80 .RE
81 .PP
82 utmp_early
83 .RS 4
84 Some broken applications actually allocate a utmp entry for the user before the user is admitted to the system\&. If some of the services you are configuring PAM for do this, you can selectively use this module argument to compensate for this behavior and at the same time maintain system\-wide consistency with a single limits\&.conf file\&.
85 .RE
86 .PP
87 noaudit
88 .RS 4
89 Do not report exceeded maximum logins count to the audit subsystem\&.
90 .RE
91 .SH "MODULE TYPES PROVIDED"
92 .PP
93 Only the
94 \fBsession\fR
95 module type is provided\&.
96 .SH "RETURN VALUES"
97 .PP
98 PAM_ABORT
99 .RS 4
100 Cannot get current limits\&.
101 .RE
102 .PP
103 PAM_IGNORE
104 .RS 4
105 No limits found for this user\&.
106 .RE
107 .PP
108 PAM_PERM_DENIED
109 .RS 4
110 New limits could not be set\&.
111 .RE
112 .PP
113 PAM_SERVICE_ERR
114 .RS 4
115 Cannot read config file\&.
116 .RE
117 .PP
118 PAM_SESSION_ERR
119 .RS 4
120 Error recovering account name\&.
121 .RE
122 .PP
123 PAM_SUCCESS
124 .RS 4
125 Limits were changed\&.
126 .RE
127 .PP
128 PAM_USER_UNKNOWN
129 .RS 4
130 The user is not known to the system\&.
131 .RE
132 .SH "FILES"
133 .PP
134 /etc/security/limits\&.conf
135 .RS 4
136 Default configuration file
137 .RE
138 .PP
139 /usr/etc/security/limits\&.conf
140 .RS 4
141 Default configuration file if
142 /etc/security/limits\&.conf
143 does not exist\&.
144 .RE
145 .SH "EXAMPLES"
146 .PP
147 For the services you need resources limits (login for example) put a the following line in
148 /etc/pam\&.d/login
149 as the last line for that service (usually after the pam_unix session line):
150 .sp
151 .if n \{\
152 .RS 4
153 .\}
154 .nf
155 #%PAM\-1\&.0
156 #
157 # Resource limits imposed on login sessions via pam_limits
158 #
159 session required pam_limits\&.so
160
161 .fi
162 .if n \{\
163 .RE
164 .\}
165 .PP
166 Replace "login" for each service you are using this module\&.
167 .SH "SEE ALSO"
168 .PP
169 \fBlimits.conf\fR(5),
170 \fBpam.d\fR(5),
171 \fBpam\fR(8)\&.
172 .SH "AUTHORS"
173 .PP
174 pam_limits was initially written by Cristian Gafton <gafton@redhat\&.com>