Subject: ftponly shell

From: Craig Wallace <[email-masked]>
Date: Thu, 19 Jun 1997 16:02:36 +0100

hi,

What is it and where can i get it ?

Regards

Craig

---

From: [email-masked] (Koos van den Hout _U nix and we all_)
Date: Thu, 19 Jun 1997 17:18:06 +0200 (MET DST)

> What is it and where can i get it ?

#!/bin/sh
#
# ftponly shell
#
echo "You are not allowed to login interactively"
#

Save as ftponly in /bin or /usr/bin or /usr/local/bin, make it mode 755,
put it in /etc/shells.

											 Grtx KH

-- 
  Koos van den Hout,     Internetter, Unix freak, ISFJ and BBS SysOp at large
  [email-masked] (Work)  <-- finger -l for PGPkey      Fax: +31-30-2586290
  [email-masked] (Home)                      Workphone: +31-30-2586287
  http://www.cetis.hvu.nl/~koos/   Looking for a license plate with "RFC 822"
  Microsoft thinks "open systems" means they can leave out security.

---

From: [email-masked] (Albert Lunde)
Date: Thu, 19 Jun 1997 10:19:44 CDT

> What is it and where can i get it ?

I just use a shell script, like this:

#!/usr/bin/csh -fe
unsetenv IFS
unset IFS
set path=( /usr/bin )
echo
echo '***********************************************************************'
echo User accounts on SYSTEM are only allowed ftp access, not telnet access.
echo Read http://SYSTEM/ for information on using SYSTEM 
echo '***********************************************************************'
echo
/usr/bin/sleep 10
exit -1

Plug in your own host name for SYSTEM. (Some of the details like setting
the path and IFS may be needless paranoia since this isn't run
in a sensitive context, except that we want it to be hard to break out of.)

You likely want to put this in /etc/shells and not put a similar
script for disabled accounts in /etc/shells.

--
    Albert Lunde                      [email-masked]

---

From: Michael Brennen <[email-masked]>
Date: Thu, 19 Jun 1997 11:16:51 -0500 (CDT)

You don't.  Just put that entry in /etc/shells.  It doesn't have to exist.

   -- Michael

---

From: Jon Lewis <[email-masked]>
Date: Fri, 20 Jun 1997 00:51:54 -0400 (EDT)

> echo "You are not allowed to login interactively"

I had to setup something similar today, and chose this instead:

ln /bin/passwd /bin/noshell
 
add /bin/noshell to /etc/shells.  Now users with /bin/noshell as their
shell cannot log in with telnet, rsh, ssh, etc., but can FTP, and can
change their password by telnet'ing to the system.  Enter
username/password, and you're prompted for a new password.  Complete that,
and your telnet session is terminated.

------------------------------------------------------------------
 Jon Lewis <[email-masked]>  |  Unsolicited commercial e-mail will
 Network Administrator       |  be proof-read for $199/message.
 Florida Digital Turnpike    |  
________Finger [email-masked] for PGP public key_______

---

From: Kent Landfield <[email-masked]>
Date: Fri, 20 Jun 1997 10:17:11 -0500 (CDT)

With all the traffic yesterday I put up a page on ftponly at

   http://www.landfield.com/wu-ftpd/ftponly/ftponly.html

It has my take on ftponly, the script I used as well as the scripts
that others posted.

-- 
Kent Landfield                        Phone: 1-817-545-2502             
The Landfield Group                   FAX:   1-817-545-7650             
Email: [email-masked]             http://www.landfield.com/
Please send comp.sources.misc related mail to [email-masked].
Search the Usenet Hypertext FAQ Archive at http://www.faqs.org/faqs/