ftp server with no shell accounts

Scott Hiemstra shiemstra at h2.com
Thu May 11 04:37:20 PDT 2006


> I tried the default ftp server with FreeBSD 5.4 and users 
> with no shell 
> accounts but it does not work.
> 
> Does anyone know of a ftp server that users would still have home 
> directories but no shell access /sbin/nologin and that could still 
> upload files to there home directories.

The default ftpd will work with a little tweaking.

1.  touch /bin/ftpshell
2.  echo "/bin/ftpshell" >> /etc/shells
3.  When you add your users, set their shell to /bin/ftpshell
4.  echo USERNAME >> /etc/ftpchroot

The users will be able to login via ftp and nothing else because there shell
is a crap fake shell.  The ftpchroot will lock them into their home
directory very effectively.

Scott




More information about the freebsd-questions mailing list