Is /etc/sysctl.conf Deprecated in macOS Catalina?

dstranathan
Valued Contributor II

After testing an in-place upgrade from 10.14.6 Mojave to 10.15.3 Catalina, I noticed that /etc/sysctl.conf file was moved to /Users/Shared/Relocated Items/Configuration/private/etc/sysctl.conf

Has this file been deprecated by Apple? Is there another location for low-level TCP settings such as "net.inet.tcp.delayed_ack=0"?

2 REPLIES 2

nwagner
Contributor

I know that the 10.15.3 Catalina update fried alot of custom conf changes. So this may be another thing that Apple changed without documentation (not surprised). ¯_(ツ)_/¯

See:
https://mrmacintosh.com/catalina-10-15-3-update-reverts-custom-pam-d-sshd_config-settings/

R_Hamilton
New Contributor

The quarantine report says

These configuration files were modified or customized by you, by another user, or by an app. The modifications are incompatible with the recent macOS upgrade. The modified files are in the Configuration folder, organized in subfolders named for their original locations.
To restore any of the custom configurations, compare your modifications with the configuration changes made during the macOS upgrade and combine them when possible.

However, their idea of "incompatible" seems to be if it's not identical to the version they supply, so a lot of changes that continue to be valid are also reverted to default. The good side of that is that it's usually worthwhile anyway to review one's customizations with each OS upgrade.

I see in my Relocated Items (or previous versions) the following:
Relocated Items/Configuration/private/etc/postfix/main.cf.system_default
Relocated Items/Configuration/private/etc/shells.system_default
Relocated Items/Configuration/private/etc/syslog.conf.system_default

but it seems to simply clobber various other configuration files in /etc, without saving the previously modified version in Relocated Items. What I've seen clobbered includes automounter maps such as /etc/auto_master, /etc/auto_home; PAM configuration such as /etc/pam.d/su, /etc/pam.d/sudo; ssh[d] configuration such as /etc/ssh/sshd_config, /etc/ssh/ssh_config.

So for each file in /etc that I modify, I now keep a copy (NOT link or symlink) with a .mine suffix; that's left alone, and I can easily compare them. I may even keep a .orig suffix as the previous unmodified, so I can see if they changed anything and use that to advise any adaptation of my version before restoring it.

I don't recall having seen sysctl.conf clobbered before though; maybe it was marginally smarter about that, or else what they decide to mess with varies by update.

/etc/sysctl.conf is still legitimate to use, and if in doubt whether a particular key is still valid, look for it in the output of sysctl -a.