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

/bin/false (was Re: security questions)



on Sat, Oct 28, 2000 at 10:06:56AM -0700, Peter Jay Salzman (p@belial.ucdavis.edu) wrote:

> also, i noticed that some accounts which are disabled are given a shell of
> /bin/false:
> 
> 	ftp:x:100:65534::/home/ftp:/bin/false
> 
> tiger seemed to hate this too.  i tried playing around with /bin/false.
> can't seem to figure out what it is.  whatever it is, it's tiny.  only 4 kb
> long.

See man false.

    false - do nothing, unsuccessfully

Think of it as /dev/null, /dev/full, /dev/zero, or the lo loopback
networking interface.  Or zero (0), for that matter.

Doing nothing can be incredibly valuable.  As the Zen saying goes:
"Don't just do something, stand there!".  /bin/true and /bin/false do
nothing.  true exits with a successful status, false exits with a
nonsuccessful status.

This is useful for accounts which you don't want to have any successful
shell access, it can be handy in shell scripts to force a failure
condition, or elsewhere.  In the same sense, /dev/null discards bits (or
returns a null read), /dev/full is a file which is always full (write
produces error), /dev/zero returns an ASCII null, and the lo interface
allows tests of networking when no "real" networking interface is
available -- this is useful both in testing services, and in setting up
systems such as diald.

-- 
Karsten M. Self <kmself@ix.netcom.com>     http://www.netcom.com/~kmself
 Evangelist, Opensales, Inc.                    http://www.opensales.org
  What part of "Gestalt" don't you understand?      There is no K5 cabal
   http://gestalt-system.sourceforge.net/        http://www.kuro5hin.org

Attachment: pgpOdx4PmyG5J.pgp
Description: PGP signature


Reply to: