public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Where is /bin/nologin
Date: Fri, 14 Oct 2011 11:56:00 -0000	[thread overview]
Message-ID: <20111014115530.GA31063@calimero.vinschen.de> (raw)
In-Reply-To: <864630202.20111014140440@mtu-net.ru>

On Oct 14 14:04, Andrey Repin wrote:
> Greetings, Corinna Vinschen!
> 
> > Or what about creating your own /sbin/nologin, something like this:
> 
> >   $ cat > /sbin/nologin <<EOF
> >   #!/bin/sh
> >   if [ -f /etc/nologin.txt ]
> >   then
> >     cat /etc/nologin.txt
> >   else
> >     echo "This account is currently not available."
> >   fi
> >   exit 0
> >   EOF
> >   $ chmod +x /sbin/nologin
> 
> I would advice against giving any clues about account status, for security
> reasons.

It's what Linux' /sbin/nologin' prints, too.  Actually it's the whole
idea of /sbin/nologin' per the man page:

  $ man nologin
  NOLOGIN(8)                BSD System Manager's Manual               NOLOGIN(8)

  NAME
       nologin — politely refuse a login
  [...]

Just `exit 0' should be replaced with `exit 1' since

  [...]
  nologin displays a message that an account is not available and exits
  non-zero.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

  reply	other threads:[~2011-10-14 11:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-13 18:37 gwodus
2011-10-13 21:20 ` David Sastre
2011-10-13 22:45   ` gwodus
2011-10-14  8:33     ` Corinna Vinschen
2011-10-14 10:05       ` Andrey Repin
2011-10-14 11:56         ` Corinna Vinschen [this message]
2011-10-15  8:25           ` gwodus
2011-10-15  8:53             ` Corinna Vinschen
2011-10-17 14:20           ` Andrey Repin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111014115530.GA31063@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).