xref: /freebsd/usr.sbin/nologin/nologin.8 (revision 6f2b8776479699a31737be94e47b2b166b82cc13)
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.\"
288fae3551SRodney W. Grimes.\"     @(#)nologin.8	8.1 (Berkeley) 6/19/93
297f3dea24SPeter Wemm.\" $FreeBSD$
308fae3551SRodney W. Grimes.\"
31*6f2b8776SMateusz Piotrowski.Dd April 15, 2020
328fae3551SRodney W. Grimes.Dt NOLOGIN 8
339fe48c6eSRuslan Ermilov.Os
348fae3551SRodney W. Grimes.Sh NAME
358fae3551SRodney W. Grimes.Nm nologin
368fae3551SRodney W. Grimes.Nd politely refuse a login
378fae3551SRodney W. Grimes.Sh SYNOPSIS
387c7fb079SRuslan Ermilov.Nm
398fae3551SRodney W. Grimes.Sh DESCRIPTION
40e1205e80SPhilippe CharnierThe
41e1205e80SPhilippe Charnier.Nm
42*6f2b8776SMateusz Piotrowskiis intended as a replacement shell field for accounts that
438fae3551SRodney W. Grimeshave been disabled.
447ba45ea9SNik Clayton.Pp
45*6f2b8776SMateusz PiotrowskiWhen executed,
46*6f2b8776SMateusz Piotrowski.Nm
47*6f2b8776SMateusz Piotrowskifirst writes about the login attempt to
48*6f2b8776SMateusz Piotrowski.Xr syslog 3
49*6f2b8776SMateusz Piotrowskiand then a displays a message that an account is not available.
50*6f2b8776SMateusz Piotrowski.Pp
517ba45ea9SNik ClaytonTo disable all logins,
527ba45ea9SNik Claytoninvestigate
537ba45ea9SNik Clayton.Xr nologin 5 .
54*6f2b8776SMateusz Piotrowski.Sh EXIT STATUS
55*6f2b8776SMateusz PiotrowskiThe
56*6f2b8776SMateusz Piotrowski.Nm
57*6f2b8776SMateusz Piotrowskiutility always exits non-zero.
58*6f2b8776SMateusz Piotrowski.Sh EXAMPLES
59*6f2b8776SMateusz PiotrowskiHere is a demonstration of executing
60*6f2b8776SMateusz Piotrowski.Nm :
61*6f2b8776SMateusz Piotrowski.Bd -literal -offset 4n
62*6f2b8776SMateusz Piotrowski$ nologin
63*6f2b8776SMateusz PiotrowskiThis account is currently not available.
64*6f2b8776SMateusz Piotrowski$ tail -n 1 /var/log/messages
65*6f2b8776SMateusz PiotrowskiMar 30 21:53:07 example.org nologin[65992]: Attempted login by beastie on /dev/pts/18
66*6f2b8776SMateusz Piotrowski.Ed
678fae3551SRodney W. Grimes.Sh SEE ALSO
68a1c1a4e9SWolfram Schneider.Xr login 1 ,
6932e5e4cfSBen Smithurst.Xr nologin 5
708fae3551SRodney W. Grimes.Sh HISTORY
718fae3551SRodney W. GrimesThe
7206389a25SPhilippe Charnier.Nm
73e1205e80SPhilippe Charnierutility appeared in
748fae3551SRodney W. Grimes.Bx 4.4 .
75