How can I enable only FTP access to the Solaris box, but not SSH and Telnet for only selected account.
2 Answers
Two things you might try:
You could use the virtual users feature of vsftpd. This would let you set up users entirely independent of the OS users. There is a vsftpd package on blastwave. This involves adding new piece of software, you might not want or be able to do that.
For ssh the
DenyUsers/DenyGroups
will stop ftpuser from loggin in. Something like this in ''sshd_config'':
DenyUsers ftpuser1 ftpuser2 DenyGroups ftpgroup
For telnet you could try to make the ftpuser
shell = /usr/bin/false (put /usr/bin/false) in /etc/shells), that should stop him from logging in over telnet but I think allow ftp (I don't have a Solaris VM to test unfortunately).
To make "only ftp" users, meaning they can only use ftp, no telnet or ssh, do this:
add /bin/false to the list of shells in /etc/shells
change your user's shell to /bin/false
-
Some ftpds (vsftpd for example) will check the validity of the account this way. See option 'check_shell' in vsftpd.conf– petrusJul 12, 2010 at 22:11