X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Fri, 14 Oct 2011 13:55:30 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Where is /bin/nologin Message-ID: <20111014115530.GA31063@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <32647652 DOT post AT talk DOT nabble DOT com> <20111013212001 DOT GB7035 AT jethro DOT local DOT lan> <32649084 DOT post AT talk DOT nabble DOT com> <20111014083252 DOT GB12878 AT calimero DOT vinschen DOT de> <864630202 DOT 20111014140440 AT mtu-net DOT ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <864630202.20111014140440@mtu-net.ru> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 < > #!/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