[comp.unix.admin] ftp won't allow users who run bash as their login shells?

anh@media-lab.media.mit.edu (Viet Anh) (02/05/91)

At my site (Vax 6320, Ultrix 3.1), users who run bash as their startup 
shells are denied access upon connecting to ftp.  Here is an excerpt 
of a failed session:

  Connected to media-lab.media.mit.edu.
  220 media-lab.media.mit.edu FTP server (Version 4.146 Tue Jul 25 23:56:36 
  EDT 1989) ready.
  Name (media-lab.media.mit.edu:): foobar
  Password (media-lab.media.mit.edu:foobar):
  530 User foobar access denied.
  ftp: Login failed

I did include bash in /etc/shells which I think where ftp looks up for shells 
it allows accesses. Other shells in the file (sh, csh, tcsh) work fine.

Thanks for any info.

Viet Anh
(anh@media-lab.media.mit.edu)
( \/\ @ Media Lab, MIT, Cambridge, MA, US, America, Earth )

nwc@galileo.shearson.com (Nick Christopher) (02/05/91)

ftp checks the file /etc/shells to find a list of valid login shells (in
addition to /bin/csh and /bin/sh that is). So if you want to use bash or tcsh
etc. just add a new, single line, entry to that file containing the name of the
shell with the path included.

--
 \n   
 	Nicholas Christopher (212) 464-3837
	Internet: nwc@sisyphus.shearson.com
	uunet: uunet!sisyphus.shearson.com!nwc

guy@auspex.auspex.com (Guy Harris) (02/07/91)

>ftp checks the file /etc/shells

Yup, the original poster knows that, and even put "bash" into the
"/etc/shells" file, as he indicated in his posting; he also indicated
that it didn't help.  Perhaps he didn't put the full path in, or didn't
put in a path that matched what's in the password file entry for folks
using "bash"?  Or perhaps there's a bug in the UNIX he's using.... 

anh@media-lab.media.mit.edu (Viet Anh) (02/08/91)

	From: guy@auspex.auspex.com (Guy Harris)
	Yup, the original poster knows that, and even put "bash" into the
	"/etc/shells" file, as he indicated in his posting; he also indicated
	that it didn't help.  Perhaps he didn't put the full path in, or didn't
	put in a path that matched what's in the password file entry for folks
	using "bash"?  Or perhaps there's a bug in the UNIX he's using.... 

Yup, apparently the ftpd on my system "hard-wires" the shells that it allows
access into its code and does not look in /etc/shells.  So the solution is
to either hack the code, get a new ftpd, or wait for a system upgrade and 
hope the problem goes away... :-)

Thanks to all who replied.

Viet Anh
-- 
( \/\ @ Media Lab, MIT, Cambridge, MA, US, America, Earth )

tim@cs.columbia.edu (Timothy Jones) (02/09/91)

Since ftp usually does a chroot() to someplace like /usr/ftp, and the password
file it uses is in /usr/ftp/etc, perhaps editing (or creating)
/usr/ftp/etc/shells is the answer...

Tim
--
Timothy Jones
Research Staff
Columbia University Department of Computer Science
tim@cs.columbia.edu

rickert@mp.cs.niu.edu (Neil Rickert) (02/09/91)

In article <TIM.91Feb8154851@tompkins.cs.columbia.edu> tim@cs.columbia.edu (Timothy Jones) writes:
>Since ftp usually does a chroot() to someplace like /usr/ftp, and the password
>file it uses is in /usr/ftp/etc, perhaps editing (or creating)
>/usr/ftp/etc/shells is the answer...

 ftp only does a chroot() for anonymous ftp.

 ftp only validates the shell when not anonymous ftp.  Or if it does validate
it for anonymous ftp, it is the shell of user 'ftp', to which nobody should
login, and not the shell of the user who is logging in anonymously.


-- 
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
  Neil W. Rickert, Computer Science               <rickert@cs.niu.edu>
  Northern Illinois Univ.
  DeKalb, IL 60115                                   +1-815-753-6940