2

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.

CamelBlues
  • 303
  • 4
  • 10

1 Answers1

2

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

Jeff Ferland
  • 20,547
  • 2
  • 62
  • 85
  • 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 01 '12 at 05:55