I am using debian version 7.4

The /etc/pam.d/su file there
does not enable pam_limits.so

the snippet is:

# Sets up user limits, please uncomment and read /etc/security/limits.conf
# to enable this functionality.
# (Replaces the use of /etc/limits in old login)
# session    required   pam_limits.so

Why is that ?

googling for it, got articles like


On some systems the pam module called pam_limits.so is not set in the file /etc/pam.d/su. When it is not set, it prevents the conveying of limits (such as open file descriptors) to any command started with su -

In particular, the HP Vertica init script would fail to start HP Vertica because it calls the Administration Tools to start a database with the su - command. This problem was first noticed on Debian systems, but the configuration could be missing on other Linux distributions.

To resolve this issue, modify the install_vertica script and append this line to the /etc/pam.d/su file:

session required pam_limits.so 

The default (no limits) work for most people. For most single-purpose, single-user, and small multi-user systems the limits module is not required because you won't be hitting any of them; for that matter, a small system user encountering a ulimit related error would probably not know how to handle it. What's more, /etc/security/limits.conf does not come preconfigured because there's no way of knowing what your needs will be so you would still have to adjust configuration to set limits. Might as well save some (scant) resources for most people and let the few who need it turn the feature on.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.