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

Here is where you can post tips and tricks to share with other users of MX. Do not ask for help in this Forum.
Message
Author
User avatar
K-mik@Z
Posts: 17
Joined: Sat May 19, 2018 10:08 am

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

#1 Post 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.
My tutorials
Sorry by advance for my english, I'm french.
Image "They didn't know it was impossible, so they did it." - Mark Twain

User avatar
oops
Posts: 1891
Joined: Tue Apr 10, 2018 5:07 pm

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

#2 Post by oops »

Thank you ... good to know.
Pour les nouveaux utilisateurs: Alt+F1 pour le manuel, ou FAQS, MX MANUEL, et Conseils Debian - Info. système “quick-system-info-mx” (QSI) ... Ici: System: MX-19_x64 & antiX19_x32

Post Reply

Return to “Tips & Tricks by users”