Friday, 3 January 2014

FTP USER CREATION IN SOLARIS 10


Files in FTP:

cat /etc/ftpusers----------delete the user who is asking for ftp
cat /etc/ftpd/ftpusers -----which can restrict a particular user not to use ftp ,contains login details

cat /etc/ftpd/ftphosts------which can used to allow are deny hosts
allow ftpadmin 10.27.1.64---this allows
deny ftpadmin 10.27.1.111----this deny

cat /etc/shells ----allow ftp conn to the hosts if shell is defined in this file
 # inetadm | grep ftp
disabled  disabled       svc:/network/ftp:default

inetadm -e ftp---enable ftp
inetadm -d ftp---disable ftp


How do I create an account that can only use FTP?
faq60-2315
Posted: 13 Aug 02
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/ftpd/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.....


for restricetd rights....

vi /etc/ftpd/ftpaccess
add a new line
"guestuser ftponly"

No comments:

Post a Comment