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
Then launch the command:
. to see the hard limits
Code: Select all
ulimit -H -a
Code: Select all
ulimit -S -a