From owner-svn-doc-all@freebsd.org Thu Jul 18 11:31:36 2019 Return-Path: Delivered-To: svn-doc-all@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 2EEB6A630C; Thu, 18 Jul 2019 11:31:36 +0000 (UTC) (envelope-from pluknet@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) server-signature RSA-PSS (4096 bits) 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 119EA85630; Thu, 18 Jul 2019 11:31:36 +0000 (UTC) (envelope-from pluknet@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 E028F6F63; Thu, 18 Jul 2019 11:31:35 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6IBVZCg069089; Thu, 18 Jul 2019 11:31:35 GMT (envelope-from pluknet@FreeBSD.org) Received: (from pluknet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6IBVZSB069087; Thu, 18 Jul 2019 11:31:35 GMT (envelope-from pluknet@FreeBSD.org) Message-Id: <201907181131.x6IBVZSB069087@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pluknet set sender to pluknet@FreeBSD.org using -f From: Sergey Kandaurov Date: Thu, 18 Jul 2019 11:31:35 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r53262 - in head/en_US.ISO8859-1/books/handbook: network-servers security X-SVN-Group: doc-head X-SVN-Commit-Author: pluknet X-SVN-Commit-Paths: in head/en_US.ISO8859-1/books/handbook: network-servers security X-SVN-Commit-Revision: 53262 X-SVN-Commit-Repository: doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 119EA85630 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-doc-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jul 2019 11:31:36 -0000 Author: pluknet Date: Thu Jul 18 11:31:35 2019 New Revision: 53262 URL: https://svnweb.freebsd.org/changeset/doc/53262 Log: Consistent use of /usr/sbin/nologin. PR: 239121 Modified: head/en_US.ISO8859-1/books/handbook/network-servers/chapter.xml head/en_US.ISO8859-1/books/handbook/security/chapter.xml Modified: head/en_US.ISO8859-1/books/handbook/network-servers/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/network-servers/chapter.xml Wed Jul 17 07:12:10 2019 (r53261) +++ head/en_US.ISO8859-1/books/handbook/network-servers/chapter.xml Thu Jul 18 11:31:35 2019 (r53262) @@ -1802,19 +1802,19 @@ nis_client_enable="YES" basie&prompt.root; cat /etc/master.passwd root:[password]:0:0::0:0:The super-user:/root:/bin/csh toor:[password]:0:0::0:0:The other super-user:/root:/bin/sh -daemon:*:1:1::0:0:Owner of many system processes:/root:/sbin/nologin -operator:*:2:5::0:0:System &:/:/sbin/nologin -bin:*:3:7::0:0:Binaries Commands and Source,,,:/:/sbin/nologin -tty:*:4:65533::0:0:Tty Sandbox:/:/sbin/nologin -kmem:*:5:65533::0:0:KMem Sandbox:/:/sbin/nologin -games:*:7:13::0:0:Games pseudo-user:/usr/games:/sbin/nologin -news:*:8:8::0:0:News Subsystem:/:/sbin/nologin -man:*:9:9::0:0:Mister Man Pages:/usr/share/man:/sbin/nologin -bind:*:53:53::0:0:Bind Sandbox:/:/sbin/nologin +daemon:*:1:1::0:0:Owner of many system processes:/root:/usr/sbin/nologin +operator:*:2:5::0:0:System &:/:/usr/sbin/nologin +bin:*:3:7::0:0:Binaries Commands and Source,,,:/:/usr/sbin/nologin +tty:*:4:65533::0:0:Tty Sandbox:/:/usr/sbin/nologin +kmem:*:5:65533::0:0:KMem Sandbox:/:/usr/sbin/nologin +games:*:7:13::0:0:Games pseudo-user:/usr/games:/usr/sbin/nologin +news:*:8:8::0:0:News Subsystem:/:/usr/sbin/nologin +man:*:9:9::0:0:Mister Man Pages:/usr/share/man:/usr/sbin/nologin +bind:*:53:53::0:0:Bind Sandbox:/:/usr/sbin/nologin uucp:*:66:66::0:0:UUCP pseudo-user:/var/spool/uucppublic:/usr/libexec/uucp/uucico -xten:*:67:67::0:0:X-10 daemon:/usr/local/xten:/sbin/nologin -pop:*:68:6::0:0:Post Office Owner:/nonexistent:/sbin/nologin -nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/sbin/nologin +xten:*:67:67::0:0:X-10 daemon:/usr/local/xten:/usr/sbin/nologin +pop:*:68:6::0:0:Post Office Owner:/nonexistent:/usr/sbin/nologin +nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin -bill::::::::: +::::::::: @@ -2075,18 +2075,18 @@ ellington&prompt.user; ypcat -k netgroup.by user entries without allowing them to login into the servers. This can be achieved by adding an extra line: - +:::::::::/sbin/nologin + +:::::::::/usr/sbin/nologin This line configures the client to import all entries but to replace the shell in those entries with - /sbin/nologin. + /usr/sbin/nologin. Make sure that extra line is placed after +@IT_EMP:::::::::. Otherwise, all user accounts imported from NIS will have - /sbin/nologin as their login + /usr/sbin/nologin as their login shell and no one will be able to login to the system. To configure the less important servers, replace the old @@ -2095,14 +2095,14 @@ ellington&prompt.user; ypcat -k netgroup.by +@IT_EMP::::::::: +@IT_APP::::::::: -+:::::::::/sbin/nologin ++:::::::::/usr/sbin/nologin The corresponding lines for the workstations would be: +@IT_EMP::::::::: +@USERS::::::::: -+:::::::::/sbin/nologin ++:::::::::/usr/sbin/nologin NIS supports the creation of netgroups from other netgroups which can be useful if the policy regarding user @@ -2134,12 +2134,12 @@ USERBOX IT_EMP ITINTERN USERS system contains two lines starting with +. The first line adds a netgroup with the accounts allowed to login onto this machine and the second line adds all other - accounts with /sbin/nologin as shell. It - is recommended to use the ALL-CAPS version of - the hostname as the name of the netgroup: + accounts with /usr/sbin/nologin as shell. + It is recommended to use the ALL-CAPS version + of the hostname as the name of the netgroup: +@BOXNAME::::::::: -+:::::::::/sbin/nologin ++:::::::::/usr/sbin/nologin Once this task is completed on all the machines, there is no longer a need to modify the local versions of Modified: head/en_US.ISO8859-1/books/handbook/security/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/security/chapter.xml Wed Jul 17 07:12:10 2019 (r53261) +++ head/en_US.ISO8859-1/books/handbook/security/chapter.xml Thu Jul 18 11:31:35 2019 (r53262) @@ -191,7 +191,7 @@ &prompt.root; pw lock toor The second method is to prevent login access by changing - the shell to /sbin/nologin. Only the + the shell to /usr/sbin/nologin. Only the superuser can change the shell for other users: &prompt.root; chsh -s /usr/sbin/nologin toor