PAM_LIMITS(8)
๐ NAME ๐
pam_limits โ bestie, it's the PAM module that puts a cap on your system resources ๐ฅ
โจ SYNOPSIS โจ
pam_limits.so [conf=/path/to/limits.conf] [debug] [set_all] [utmp_early]
[noaudit]
๐ฆ DESCRIPTION ๐ฆ
okay so here's the tea: pam_limits is a PAM module that sets limits on the system resources you can grab in a user-session. and yes, even users with uid=0 are affected by these limits โ no one is above the limit law, not even root ๐
by default, limits get pulled from the /etc/security/limits.conf config file. then the individual *.conf files in the /etc/security/limits.d/ directory get read too. these files are parsed one after another in the order of the "C" locale. and the effect of all the individual files is the same as if you'd concatenated them all together in parsing order. BUT โ if you explicitly specify a config file with a module option, then the files in that directory are not parsed. periodt.
โ ๏ธ important: this module must not be called by a multithreaded application. like, don't. that's the rule.
and if Linux PAM is compiled with audit support, the module will report when it denies access based on the limit of maximum number of concurrent login sessions ๐
๐ OPTIONS ๐
conf=/path/to/limits.confโ point at an alternativelimits.conf-style config file to override the default one ๐๏ธdebugโ print debug info. classic. ๐set_allโ sets the limits for which no value is specified in the config file to the one from the process with the PID 1. but heads up bestie: if the init process is systemd, these limits will not be the kernel default limits, and you should not use this option ๐utmp_earlyโ 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're configuring PAM for do this, you can selectively use this module argument to compensate for that behavior, and at the same time keep system-wide consistency with a singlelimits.conffile ๐งnoauditโ don't report exceeded maximum logins count to the audit subsystem ๐คซ
๐ MODULE TYPES PROVIDED ๐
only the session module type is provided. that's it. that's the whole list. ๐
๐ RETURN VALUES ๐
PAM_ABORTโ cannot get current limits ๐ญPAM_IGNOREโ no limits found for this user ๐คทPAM_PERM_DENIEDโ new limits could not be set ๐ซPAM_SERVICE_ERRโ cannot read config file ๐PAM_SESSION_ERRโ error recovering account name ๐ตPAM_SUCCESSโ limits were changed, slay โจPAM_USER_UNKNOWNโ the user is not known to the system ๐ป
๐ FILES ๐
/etc/security/limits.confโ the default configuration file ๐
๐ธ EXAMPLES ๐ธ
for the services where you need resource limits (login, for example), put the following line in /etc/pam.d/login as the last line for that service โ usually after the pam_unix session line:
#%PAM-1.0
#
# Resource limits imposed on login sessions via pam_limits
#
session required pam_limits.so
and then just replace "login" for each service you're using this module with ๐ซถ
โญ SEE ALSO โญ
limits.conf(5), pam.d(5), pam(8).
๐ AUTHORS ๐
pam_limits was initially written by Cristian Gafton <gafton@redhat.com> โ iconic behavior, we love to see it ๐
and that's the whole vibe check bestie โ this is from the Linux-PAM crew, dated 09/27/2026, and it's giving documentation excellence. mwah. ๐โจ
๐ฆ where this page comes from
- arch rolling: pam 1.7.3-1 ยท GPL-2.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms