Securing Your Startup Scripts

The startup scripts on your system reside in the /etc/rc2.d and /etc/rc3.d directories. Many of the services here are not required for proper operation of your system and pose potential security vulnerabilities. Preventing a script from starting is as simple as replacing the capital S with any other letter or, in the case of a kill script, replacing the capital K with a number. Here are some common services that you might not require and, in most cases, can safely disable:

  • Automounter— /etc/rc2.d/S74autofs

  • Sendmail— /etc/rc2.d/S88sendmail and /etc/rc1.d/K57sendmail

  • SNMP— /etc/rc2.d/S76snmpdx

  • Autoinstall— /etc/rc2.d/S72autoinstall

  • Cachefs— S73cachefs.daemon

Get CCIE Practical Studies: Security (CCIE Self-Study) now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.