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   Newer Topic  |  Older Topic 
 No Sh for ftp users
Author: AAron 
Date:   03-02-03 00:31

Hi

I read a posting on here a ways back on how to deny access to sh or shell for incoming ftp users. Can't seem to find the artical. Could someone provide a link if you know where it is.

Many thanx

Aaron

Reply To This Message
 
 Re: No Sh for ftp users
Author: someone 
Date:   18-02-03 01:11

Try

chpass user
edit the shell to /sbin/nologin

Reply To This 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  |  Threaded View   Newer Topic  |  Older Topic 


 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