How do you permanently set process limit per user (
ulimit -u) in Ubuntu?
/etc/security/limits.conf and configure
You may need to add
pam_limits to your pam configuration. The default configuration has pam_limits configured for many services. You may want to add pam_limits to
/etc/security/limits.conf, making changes per the examples and for the limits you want.
You'll also need to add a line to the
session required pam_limits.so
The change to PAM modules may be necessary elsewhere, but generally,
common-session is included related configurations, e.g.,
$ grep common-session /etc/pam.d/sshd : sshd:@include common-session