Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

On CentOS distros, there is an /etc/security/limits.d/90-noproc.conf that sets a process limit for all users:

# Default limit for number of user's processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.

*          soft    nproc     1024

I'd like to keep this limit in there, but allow one user to have more than 1024 processes. Because of how the server is puppetized, I'm unable to use the built-in bash ulimit command.

share|improve this question
add comment

1 Answer

First, I suggest fixing the setting appropriately in Puppet. You can write a line that only applies to that server and adds an entry for your specific user.

The other thing you can do is chattr +i (mark as immutable) the file after you make your desired changes. Let's see Puppet change the file then.

The actual resultant file is /etc/limits.conf

share|improve this answer
    
Would it be best practice to puppetize my limits.conf? or just add a new file in /etc/security/limits.d/? –  CamelBlues Aug 29 '12 at 19:35
1  
@CamelBlues Just go with limits.d/ since the directory is there. That keeps you from having to fight against the system scripts and write up definitions to turn them off. –  Jeff Ferland Sep 1 '12 at 5:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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