Thursday, May 31, 2012

HOWTO Disable ftp and telnet in Solaris 8

I was OnCall and as my skill in Solaris is not the one that I would desire, I wanted to post this solution because it may come to your attention too.

In Solaris 10 you can disable these 2 services: ftp and telnet by using svcadm:
svcadm disable telnet
Yes, simple as that.

The thing is that for Solaris 8 the procedure is not the same because Solaris 8 doesn't have svcadm. So here's the thing:

Edit inetd configuation file by running the following:
vi /etc/inetd.conf

Comment the lines that make reference to telnet and ftp. The line should look like:
#telnet stream tcp6 nowait root /usr/sbin/in.telnetd in.telnetd

Once you are done, save the changes and run the following command to reload inetd configuration without rebooting the server:
pkill -HUP inetd

And that's it :) Hope that helps.