If you wish to disable the FTP service on a Solaris 2.7 system, you can take the following steps while logged in as root.
- Edit /etc/inetd.conf, since the ftp daemon is started through inetd
and comment out the ftp line.
ftp stream tcp nowait root /usr/local/etc/tcpd /usr/sbin/in.ftpd
#ftp stream tcp nowait root /usr/local/etc/tcpd /usr/sbin/in.ftpd
Send a "-HUP" signal to the inetd process, which will cause inetd to restart
using the new contents of inetd.conf.
# pkill -HUP inetd
If you issue the
ps -e | grep inetd commands before and after
the pkill command, you may see
the same PID for the inetd process, but if you now try connecting to
the system with FTP, you should get a "connection refused" message, since
the ftp daemon will no longer be started by the inetd service.