[lug] ftp only login

Deva Samartha blug-nospam at mtbwr.net
Fri Feb 16 07:58:18 MST 2001


I've played with that before and put in /dev/null as a shell - would not work.

so, just now, I made a shell script:

  cat /sbin/nologin
/bin/echo NO LOGIN

which gives me:

ftp-test's password:
Last login: Fri Feb 16 07:27:16 2001 from munich
Have a lot of fun...
/sbin/nologin: Exec format error

probably need to feed it through a shell but I made it a C program and that 
works:

Last login: Fri Feb 16 07:39:05 2001 from munich
Have a lot of fun...
NO LOGIN

So far so good - but now, the ftp gives me:

Trying to connect to 192.168.5.53...
Password:
Login incorrect.

so, somehow the ftp demon checks for a valid login shell and seems to 
execute it and if that fails, it bombs - or, maybe it checks for a valid shell?

- maybe I need to put the /sbin/nologin in /etc/shells...

yupp! - that works!

thanks!

Samartha



At 07:13 AM 2/16/01 -0700, you wrote:
>One way I've seen is at the end of the user's entry in /etc/passwd use an
>invalid shell.
>
>So:
>
>user:x:UID:GID:Name:/whatever/home/:/etc/false
>
>(this is a RH entry for xfs in one I'm looking at right now)
>
>instead of:
>
>user:x:UID:GID:Name:/whatever/home/:/bin/bash
>
>John
>
>Deva Samartha wrote:
>
> > How can I make a ftp only login so that it works with ftp access only and
> > every other service under that login is disabled?
> >
> > S.
> >
> > _______________________________________________
> > Web Page:  http://lug.boulder.co.us
> > Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
>
>_______________________________________________
>Web Page:  http://lug.boulder.co.us
>Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug




More information about the LUG mailing list