2

I need to apply "ulimit -s 256" to any system thread. Is there any way to achieve this under Ubuntu Server?

1
  • 1
    What about /etc/security/limits.conf ? Doesn't it solve the problem?
    – HUB
    Jul 20 '11 at 13:07
3

You can set user limits via pam_limits in /etc/security/limits.conf. See man limits.conf for informations about this file.

2

On Ubuntu 12.04 /etc/security/limits.conf does not appear to be read unless the following is added to /etc/pam.d/common-session.

session required pam_limits.so

Even then, it's not clear to me if it is picked up for programs started by upstart scripts.

1
  • 1
    Note that there is also a commented line in /etc/pam.d/su: # session required pam_limits.so. Jan 17 '13 at 8:00

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.