Debian squeeze and setting ulimit

reza picture reza · Apr 2, 2013 · Viewed 11.4k times · Source

All

I want to permanently set the core file size to unlimited. Reading about it, the suggestion is to modify the /etc/security/limits.conf. I have done so with the following line:

  • soft core 10000 root hard core 10000

I reboot after the change and I issue ulimit -a and core is still set to 0. Can not understand why the setting is not working. What can be overwriting it?

Answer

mkjasinski picture mkjasinski · Apr 2, 2013

Try this:

*               soft    nofile          10000
*               hard    nofile          10000

and add this line to .profile file, f.e. for root in /root/.profile

ulimit -c 10000

or for all users in /etc/profile.

Remember: for remote users: /etc/pam.d/sshd and for su /etc/pam.d/su

session    required     /lib/security/pam_limits.so