Tag Archives: disabling

Unix Disabling Daemons / services from inetd.conf

Tune your system more by disabling all unwanted and unused daemons from running on the system. This can be done by  editing the /etc/inetd.conf file and the rc files or directories.

Modify the /etc/inetd.conf file and disable unnecessary daemons running on the system.
# vi /etc/inetd.conf
#
# Configuration file for inetd(1M). See inetd.conf(4).
#
# To re-configure the running inetd process, edit this file, then
# send the inetd process a SIGHUP. kill -HUP [PID]
#
#ftp stream tcp nowait root /usr/sbin/in.ftpd in.ftpd -l
#telnet stream tcp nowait root /usr/sbin/in.telnetd in.telnetd
#talk dgram udp wait root /usr/sbin/in.talkd in.talkd
#ntalk dgram udp wait root /usr/sbin/in.ntalkd in.ntalkd
#uucp stream tcp nowait root /usr/sbin/in.uucpd in.uucpd
#
#finger stream tcp nowait nobody /usr/sbin/in.fingerd in.fingerd
#tftp dgram udp wait root /usr/sbin/in.tftpd in.tftpd

#bootps dgram udp wait root /usr/sbin/in.bootpd in.bootpd
#talk dgram udp wait root /usr/sbin/tcpd in.talkd
After the /etc/inetd.conf file has been modified and daemons have been disabled, find the process ID (PID) of the inetd
daemon that is running and restart it with the kill -HUP command.
Flavor: AT&T
# ps -ef | grep inetd
root 124 1 ? S 30:57 /usr/sbin/inetd -s
ugu 10377 10378 pts/4 S 0:00 grep inetd
# kill -HUP 124
Flavor: BSD
# ps -ax | grep inetd
124 ? S 30:57 /usr/sbin/inetd -s
10377 pts/4 S 0:00 grep inetd
# kill -HUP 124


If accounting is turned on you can check the system log files (/var/adm/messages or /var/adm/SYSLOG) to verify the inetd daemon had restarted. If you check the process table again, you’ll see that the PID never changed. It isn’t suppose to. A kill  -HUP does not kill the process, it actually sends a hang-up signal. Many daemons, such as the inetd daemon, will catch the signal and reread its configuration file and continue running.
If the process didn’t restart and you can still connect to the daemons, it is not advisable but it is possible to kill the inetd daemon and restart it manually. It should be done in one single command line, if possible:


# kill 124; /usr/etc/inetd
Then check the process table ( ps -ef or ps -ax ) to verify that the daemon is running. This time it will have a new PID.

Unix Disabling Daemons / services from inetd.conf

Tune your system more by disabling all unwanted and unused daemons from running on the system. This can be done by  editing the /etc/inetd.conf file and the rc files or directories.

Modify the /etc/inetd.conf file and disable unnecessary daemons running on the system.
# vi /etc/inetd.conf
#
# Configuration file for inetd(1M). See inetd.conf(4).
#
# To re-configure the running inetd process, edit this file, then
# send the inetd process a SIGHUP. kill -HUP [PID]
#
#ftp stream tcp nowait root /usr/sbin/in.ftpd in.ftpd -l
#telnet stream tcp nowait root /usr/sbin/in.telnetd in.telnetd
#talk dgram udp wait root /usr/sbin/in.talkd in.talkd
#ntalk dgram udp wait root /usr/sbin/in.ntalkd in.ntalkd
#uucp stream tcp nowait root /usr/sbin/in.uucpd in.uucpd
#
#finger stream tcp nowait nobody /usr/sbin/in.fingerd in.fingerd
#tftp dgram udp wait root /usr/sbin/in.tftpd in.tftpd

#bootps dgram udp wait root /usr/sbin/in.bootpd in.bootpd
#talk dgram udp wait root /usr/sbin/tcpd in.talkd
After the /etc/inetd.conf file has been modified and daemons have been disabled, find the process ID (PID) of the inetd
daemon that is running and restart it with the kill -HUP command.
Flavor: AT&T
# ps -ef | grep inetd
root 124 1 ? S 30:57 /usr/sbin/inetd -s
ugu 10377 10378 pts/4 S 0:00 grep inetd
# kill -HUP 124
Flavor: BSD
# ps -ax | grep inetd
124 ? S 30:57 /usr/sbin/inetd -s
10377 pts/4 S 0:00 grep inetd
# kill -HUP 124


If accounting is turned on you can check the system log files (/var/adm/messages or /var/adm/SYSLOG) to verify the inetd daemon had restarted. If you check the process table again, you’ll see that the PID never changed. It isn’t suppose to. A kill  -HUP does not kill the process, it actually sends a hang-up signal. Many daemons, such as the inetd daemon, will catch the signal and reread its configuration file and continue running.
If the process didn’t restart and you can still connect to the daemons, it is not advisable but it is possible to kill the inetd daemon and restart it manually. It should be done in one single command line, if possible:


# kill 124; /usr/etc/inetd
Then check the process table ( ps -ef or ps -ax ) to verify that the daemon is running. This time it will have a new PID.