[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Preventing logins /bin/false ?



* Ian Perry (iperry@inertia.com.au) [010816 20:11]:
> Hi,
> 
> Quick question.
> I have been using /dev/null to prevent shell logins (yet still leave pop3
> etc running) as follows:
> username:x:1000:1000:Mr User,,,:/home/homedir:/dev/null
> 
> I noticed that the shell can also be put as /bin/false as in ftp
> 
> I prefer /dev/null as the user is instantaneously disconnected without any
> messages.

Umm ... how does that make it preferable to /bin/false, which does (from
the user's perspective) exactly the same?  Note: it has nothing to do
with ftp, except that ftp users are commonly assigned this shell to
prevent them from logging in to a shell. I think /bin/false is a more
common approach, as it is an actual executable binary. Somehow that
makes it make more sense to call exec() on. So really, what it does is
actually run, failing, rather than failing to run (as a properly
permissioned /dev/null would do).

The difference seems pedantic, and it should make no practical
difference.

Cheers,

-- 
Vineet                                   http://www.anti-dmca.org
Unauthorized use of this .sig may constitute violation of US law.
Qba\'g gernq ba zr\!                  |tr 'a-zA-Z' 'n-za-mN-ZA-M'

Attachment: pgpr8OcJgq3OL.pgp
Description: PGP signature


Reply to: