xref: /freebsd/usr.sbin/nologin/nologin.8 (revision 8a7b61203704d362cfbc66c00619f51b24106b55)
18fae3551SRodney W. Grimes.\" Copyright (c) 1993
28fae3551SRodney W. Grimes.\"	The Regents of the University of California.  All rights reserved.
38fae3551SRodney W. Grimes.\"
48fae3551SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without
58fae3551SRodney W. Grimes.\" modification, are permitted provided that the following conditions
68fae3551SRodney W. Grimes.\" are met:
78fae3551SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright
88fae3551SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer.
98fae3551SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright
108fae3551SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer in the
118fae3551SRodney W. Grimes.\"    documentation and/or other materials provided with the distribution.
12fbbd9655SWarner Losh.\" 3. Neither the name of the University nor the names of its contributors
138fae3551SRodney W. Grimes.\"    may be used to endorse or promote products derived from this software
148fae3551SRodney W. Grimes.\"    without specific prior written permission.
158fae3551SRodney W. Grimes.\"
168fae3551SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
178fae3551SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
188fae3551SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
198fae3551SRodney W. Grimes.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
208fae3551SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
218fae3551SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
228fae3551SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
238fae3551SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
248fae3551SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
258fae3551SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
268fae3551SRodney W. Grimes.\" SUCH DAMAGE.
278fae3551SRodney W. Grimes.\"
286f2b8776SMateusz Piotrowski.Dd April 15, 2020
298fae3551SRodney W. Grimes.Dt NOLOGIN 8
309fe48c6eSRuslan Ermilov.Os
318fae3551SRodney W. Grimes.Sh NAME
328fae3551SRodney W. Grimes.Nm nologin
338fae3551SRodney W. Grimes.Nd politely refuse a login
348fae3551SRodney W. Grimes.Sh SYNOPSIS
357c7fb079SRuslan Ermilov.Nm
368fae3551SRodney W. Grimes.Sh DESCRIPTION
37e1205e80SPhilippe CharnierThe
38e1205e80SPhilippe Charnier.Nm
396f2b8776SMateusz Piotrowskiis intended as a replacement shell field for accounts that
408fae3551SRodney W. Grimeshave been disabled.
417ba45ea9SNik Clayton.Pp
426f2b8776SMateusz PiotrowskiWhen executed,
436f2b8776SMateusz Piotrowski.Nm
44*57b9e06aSMateusz Piotrowskifirst writes about the login attempt to
456f2b8776SMateusz Piotrowski.Xr syslog 3
461565e188SMateusz Piotrowskiand then displays a message that an account is not available.
476f2b8776SMateusz Piotrowski.Pp
487ba45ea9SNik ClaytonTo disable all logins,
497ba45ea9SNik Claytoninvestigate
507ba45ea9SNik Clayton.Xr nologin 5 .
516f2b8776SMateusz Piotrowski.Sh EXIT STATUS
526f2b8776SMateusz PiotrowskiThe
536f2b8776SMateusz Piotrowski.Nm
546f2b8776SMateusz Piotrowskiutility always exits non-zero.
556f2b8776SMateusz Piotrowski.Sh EXAMPLES
566f2b8776SMateusz PiotrowskiHere is a demonstration of executing
576f2b8776SMateusz Piotrowski.Nm :
586f2b8776SMateusz Piotrowski.Bd -literal -offset 4n
596f2b8776SMateusz Piotrowski$ nologin
606f2b8776SMateusz PiotrowskiThis account is currently not available.
616f2b8776SMateusz Piotrowski$ tail -n 1 /var/log/messages
626f2b8776SMateusz PiotrowskiMar 30 21:53:07 example.org nologin[65992]: Attempted login by beastie on /dev/pts/18
636f2b8776SMateusz Piotrowski.Ed
648fae3551SRodney W. Grimes.Sh SEE ALSO
65a1c1a4e9SWolfram Schneider.Xr login 1 ,
6632e5e4cfSBen Smithurst.Xr nologin 5
678fae3551SRodney W. Grimes.Sh HISTORY
688fae3551SRodney W. GrimesThe
6906389a25SPhilippe Charnier.Nm
70e1205e80SPhilippe Charnierutility appeared in
718fae3551SRodney W. Grimes.Bx 4.4 .
72