The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
Scripts / handy tips
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Previous Message  |  Next Message 
 Re: No Sh for ftp users
Author: el_kab0ng 
Date:   06-08-03 20:41

That would probably be me. I've posted it a few times in the basic support forums, but it appears the last one I posted rolled off the archives.

In any event, do the following if you want to allow FTP to a user, but NOT a shell account. (As well as chroot'ing the user to lock them down to whatever home dir you set them up as so they can't bounce all over your box)

cp /sbin/no-login to /sbin/ftp-nologin
vi /etc/shells and add the /sbin/ftp-nologin to it.
add a user to your system using the /stand/sysinstall
when it comes to which shell to use, use /sbin/ftp-nologin
vi /etc/ftpchroot and add the newly created username to that file. (chances are ftpchroot doesn't exist on your system, that's ok, just create the file.)

Try ssh'ing in to your machine as them, it should drop you.

Next FTP in, and try to cd .., you should be restricted to the home directory you set up for them.

 Reply To This Message  |  Forum List  |  Flat View   Newer Topic  |  Older Topic 

 Topics Author  Date
 No Sh for ftp users   new
AAron 03-02-03 00:31 
 Re: No Sh for ftp users   new
someone 18-02-03 01:11 
 Re: No Sh for ftp users   new
el_kab0ng 06-08-03 20:41 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org