This tip was excerpted from searchSolaris.com's ASK THE EXPERT feature. To pose your own question, go to https://searchdatacenter.techtarget.com/contributors.
How can you allow only some specific users to ftp telnet services and block all the others who may have privileges to the server?
ANSWER FROM THACKER:
Actually, this is an interesting question if my interpretation is correct.
There are two possible ways to interpret this question:
1. How do I limit access to the telnet and ftp binaries on a server to a specific set of Unix UserID's?
2. How do I limit access OVER THE NETWORK inbound to a server for the FTP and Telnet services?
Let's address these in order.
1. Limiting the access to local users
A. You can limit the 'telnet' and 'ftp' binaries themselves by using either Solaris Access Control Lists (ACL's) or by using Unix groups. This will limit who has the ability to execute these files.
B. In Solaris 8, you can utilize Role Based Access Control to create a 'role' that has the ability to execute the 'telnet' and 'ftp' command. Then, users are assigned to this role and can assume this role through the 'su' command. User auditing is maintained through all of the role assumptions.
2. Limit login to particular users over the network:
A. For FTP, you may add users who are NOT supposed to be able to login via the FTP protocol to the file /etc/ftpusers. In Solaris 8,'root'is now added as a restricted user.
B. Wietse Venema's TCP Wrappers program can be used to restrict what hosts, domains, etc. are allowed to connect to the Telnet, FTP and other network services. This isn't userid-based restriction however. This is available at ftp://ftp.porcupine.org/pub/security/index.html.
C. SunScreen Lite for Solaris 8 (www.sun.com/security) or the IPFilter product can also restrict what hosts or networks have access, but again, this isn't based on username.
There are much larger questions that I haven't answered here concerning the use of Secure Shell and Kerberos for authenticating and allowing access to network services. In a future follow-up, I shall attempt to do this. For now, please take a look at: http://www.sun.com/security for more information.
Also, please review the latest installment of our Solaris Security Toolkit (formerly known as JASS) that shows you how to harden your Solaris system and restrict access to network services. This information is available at the Sun BluePrints Web site: http://www.sun.com/blueprints.
Hope that this helps!