Skip to main content
IBM  
Shop Support Downloads
IBM Home Products Consulting Industries News About IBM
IBM developerWorks : Linux : Education - Tutorials
LPI certification 102 exam prep, Part 3
ZIPPDF (letter)PDF (A4)e-mail
Main menuSection menuFeedbackPreviousNext
4. Security overview
  


Turning off unused network services (standalone servers) page 11 of 21


Some servers are not launched by inetd or xinetd, but are instead running all the time as "standalone" servers. This often includes servers such as atd, lpd, sshd, nfsd, and others. In fact, inetd and xinetd are both standalone servers themselves, and if you have commented out all of the services in their respective config files, you may choose to turn them off completely.

Standalone servers are usually started by the init system when the system boots up or changes runlevels. If you don't remember how runlevels work, take a look at Part 4 of the LPI 101 series.

To stop the init system from starting a server, find the symlinks to its startup script in each runlevel directory, and delete them. The runlevel directories are usually named /etc/rc3.d or /etc/rc.d/rc3.d (for runlevel 3). You'll also want to check the other runlevels.

Once the runlevel symlinks for the service are removed, you will still need to shut down the currently running server. It is best to do this with the service's init script, usually found in /etc/init.d or /etc/rc.d/init.d. For example, to shut down sshd:


# /etc/init.d/sshd stop
* Stopping sshd... [ ok ]

Main menuSection menuFeedbackPreviousNext
Privacy Legal Contact