Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I create an account that can only use FTP?

solaris nttworkin

How do I create an account that can only use FTP?

by  mrn  Posted    (Edited  )
If you want an account that can only be used via ftp do the following, please remember the only user that will be able to ftp is ftponly, if you require other users to ftp edit the /etc/ftpusers file and either comment out (using a # at the start of the line) or remove the user from the file.

1) cat /etc/passwd|cut -f 1 -d: > /etc/ftpusers

2) At the prompt type

echo 'echo "This account only allows FTP Access."' > /bin/ftponly

make the file executable

chmod a+x /bin/ftponly

3) Next check to see if you have the file /etc/shells

a) If you have, edited the file and add

/bin/ftponly

b) If not do

ls /bin/*sh > /etc/shells
then add the /bin/ftponly line


4) Next create the user

useradd -c "FTP Only User" -d /home/ftpfiles -m -s /bin/ftponly -g staff ftponly

5) give the ftponly account a passwd

passwd ftponly

Have fun.....
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top