Page 1 of 1

[tuto][system][fix][missing] limits.conf & pam: resource usage limits

Posted: Sat Dec 28, 2019 3:26 pm
by K-mik@Z


Define the limits:


You may know, the hard (kernel) and soft (user, modifiable until reaching the kernel level) limits can be set under linux in the /etc/security/limits.conf file ( or better, in /etc/security/limits.d/*.conf )
More info here

NB: It is also possible to modify these values ​​using the ulimit command line tool.


Apply to login:

These limits are applied by PAM during the login of a user.

It is therefore necessary, in pam, to ensure that a call is made to the pam_limits.so module when opening the session.

Under Debian, in the /etc/pam.d/common-session file, add the line:

Code: Select all

session required pam_limits.so
Close your session and reopen it.


Then launch the command:
. to see the hard limits

Code: Select all

ulimit -H -a
. to see the soft limits

Code: Select all

ulimit -S -a
With ulimit -a , all current limits are reported.

Re: [tuto][system][fix][missing] limits.conf & pam: resource usage limits

Posted: Sat Dec 28, 2019 4:54 pm
by oops
Thank you ... good to know.