1PAM_LIMITS(8)                  Linux-PAM Manual                  PAM_LIMITS(8)
2
3
4

NAME

6       pam_limits - PAM module to limit resources
7

SYNOPSIS

9       pam_limits.so [conf=/path/to/limits.conf] [debug] [set_all]
10                     [utmp_early] [noaudit]
11

DESCRIPTION

13       The pam_limits PAM module sets limits on the system resources that can
14       be obtained in a user-session. Users of uid=0 are affected by this
15       limits, too.
16
17       By default limits are taken from the /etc/security/limits.conf config
18       file. Then individual *.conf files from the /etc/security/limits.d/
19       directory are read. The files are parsed one after another in the order
20       of "C" locale. The effect of the individual files is the same as if all
21       the files were concatenated together in the order of parsing. If a
22       config file is explicitly specified with a module option then the files
23       in the above directory are not parsed.
24
25       The module must not be called by a multithreaded application.
26
27       If Linux PAM is compiled with audit support the module will report when
28       it denies access based on limit of maximum number of concurrent login
29       sessions.
30

OPTIONS

32       conf=/path/to/limits.conf
33           Indicate an alternative limits.conf style configuration file to
34           override the default.
35
36       debug
37           Print debug information.
38
39       set_all
40           Set the limits for which no value is specified in the configuration
41           file to the one from the process with the PID 1. Please note that
42           if the init process is systemd these limits will not be the kernel
43           default limits and this option should not be used.
44
45       utmp_early
46           Some broken applications actually allocate a utmp entry for the
47           user before the user is admitted to the system. If some of the
48           services you are configuring PAM for do this, you can selectively
49           use this module argument to compensate for this behavior and at the
50           same time maintain system-wide consistency with a single
51           limits.conf file.
52
53       noaudit
54           Do not report exceeded maximum logins count to the audit subsystem.
55

MODULE TYPES PROVIDED

57       Only the session module type is provided.
58

RETURN VALUES

60       PAM_ABORT
61           Cannot get current limits.
62
63       PAM_IGNORE
64           No limits found for this user.
65
66       PAM_PERM_DENIED
67           New limits could not be set.
68
69       PAM_SERVICE_ERR
70           Cannot read config file.
71
72       PAM_SESSION_ERR
73           Error recovering account name.
74
75       PAM_SUCCESS
76           Limits were changed.
77
78       PAM_USER_UNKNOWN
79           The user is not known to the system.
80

FILES

82       /etc/security/limits.conf
83           Default configuration file
84

EXAMPLES

86       For the services you need resources limits (login for example) put a
87       the following line in /etc/pam.d/login as the last line for that
88       service (usually after the pam_unix session line):
89
90           #%PAM-1.0
91           #
92           # Resource limits imposed on login sessions via pam_limits
93           #
94           session  required  pam_limits.so
95
96
97       Replace "login" for each service you are using this module.
98

SEE ALSO

100       limits.conf(5), pam.d(5), pam(8).
101

AUTHORS

103       pam_limits was initially written by Cristian Gafton <gafton@redhat.com>
104
105
106
107Linux-PAM Manual                  09/03/2021                     PAM_LIMITS(8)
Impressum