Disabling Core Dump?

Hi everyone,
I am trying to disable the core dump to free up disk space. I do have some concerns so any help is appreciated.
FIrst I will do this :`

> # vi /etc/security/limits.conf and I will add this line to the file :

> * hard core 0

 after that I will # echo 'fs.suid_dumpable = 0' >> /etc/sysctl.conf
# sysctl -p

Now my concern is that I am doing it for the first time so , I don’t want to mess anything up. The /etc/security/limits.conf file to me seems a bit off when I open it .

The /etc/security/limits.conf file shows defaults and options with no specific entries to modify performance. It is up to you should you choose to change the default behavior of the security system.

It is simpler to manage, keep track of your specific configs, and less likely to break things if you put your entries into individual .conf files in /etc/sysctl.d/ and /etc/security.d/ as noted inside the .conf files themselves. Also consider that those files are installed by rpm packages, and custom files you create should never be altered by package upgrades while default system files may be altered or overwritten.

# cat /etc/sysctl.conf 
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
# For more information, see sysctl.conf(5) and sysctl.d(5).
1 Like