1. Create an FTP user and set the password.
# useradd -d /export/home/ftpuser -m -s /bin/sh -c "User That Can FTP Only" ftpuser # # passwd ftpuser New Password: Re-enter new Password: passwd: password successfully changed for ftpuser
2. Change the shell /bin/bash to /bin/false in /etc/passwd file to disable the ftpuser from logging using telnet, ssh or rlogin.
• The default /etc/passwd will be looked like this:
# more /etc/passwd .... .... userftp:x:xxxx:xx:User That Can FTP Only:/export/home/ftpuser:/bin/bash
• Then, change it to be like this:
# more /etc/passwd .... .... userftp:x:xxxx:xx:User That Can FTP Only:/export/home/ftpuser:/bin/false
3. Create /etc/shells file and /bin/false line.
# vi /etc/shells /bin/false
4. Test the connection.
# ftp # telnet # ssh # rlogin