From owner-svn-src-stable@freebsd.org Sun Jul 26 10:04:03 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 925503A3816; Sun, 26 Jul 2020 10:04:03 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BDz6q3Lkvz4NLn; Sun, 26 Jul 2020 10:04:03 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 560A8AF46; Sun, 26 Jul 2020 10:04:03 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06QA43Kq025664; Sun, 26 Jul 2020 10:04:03 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06QA43ni025663; Sun, 26 Jul 2020 10:04:03 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202007261004.06QA43ni025663@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Sun, 26 Jul 2020 10:04:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r363554 - stable/12/usr.sbin/nologin X-SVN-Group: stable-12 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/12/usr.sbin/nologin X-SVN-Commit-Revision: 363554 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Jul 2020 10:04:03 -0000 Author: 0mp (doc,ports committer) Date: Sun Jul 26 10:04:02 2020 New Revision: 363554 URL: https://svnweb.freebsd.org/changeset/base/363554 Log: MFC 359967: Document the exit status and the stdout message of nologin(8) Reviewed by: debdrup (earlier version) Differential Revision: https://reviews.freebsd.org/D24196 Modified: stable/12/usr.sbin/nologin/nologin.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/nologin/nologin.8 ============================================================================== --- stable/12/usr.sbin/nologin/nologin.8 Sun Jul 26 10:01:27 2020 (r363553) +++ stable/12/usr.sbin/nologin/nologin.8 Sun Jul 26 10:04:02 2020 (r363554) @@ -28,7 +28,7 @@ .\" @(#)nologin.8 8.1 (Berkeley) 6/19/93 .\" $FreeBSD$ .\" -.Dd June 19, 1993 +.Dd April 15, 2020 .Dt NOLOGIN 8 .Os .Sh NAME @@ -39,14 +39,31 @@ .Sh DESCRIPTION The .Nm -utility displays a message that an account is not available and -exits non-zero. -It is intended as a replacement shell field for accounts that +is intended as a replacement shell field for accounts that have been disabled. .Pp +When executed, +.Nm +first writes about the login attempt to +.Xr syslog 3 +and then a displays a message that an account is not available. +.Pp To disable all logins, investigate .Xr nologin 5 . +.Sh EXIT STATUS +The +.Nm +utility always exits non-zero. +.Sh EXAMPLES +Here is a demonstration of executing +.Nm : +.Bd -literal -offset 4n +$ nologin +This account is currently not available. +$ tail -n 1 /var/log/messages +Mar 30 21:53:07 example.org nologin[65992]: Attempted login by beastie on /dev/pts/18 +.Ed .Sh SEE ALSO .Xr login 1 , .Xr nologin 5