From nobody Fri Apr 08 09:03:53 2022 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D08CA1A8CDC3; Fri, 8 Apr 2022 09:03:53 +0000 (UTC) (envelope-from git@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KZXNn3SH0z4T7s; Fri, 8 Apr 2022 09:03:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649408633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xb88WQsXLQyg5bgr0jhA5zdSHQlGlika781xbPgpw/4=; b=yJRrzP0402ZVCbgTmaIFCyX+zf3FrKRC3Yo2OIEqoeMutQa88V8wxiedRGVigcSGct2/q3 TtROGK0BVHrGYhaJTf7mp9XkAtUA5FZ+8XM8H9ojcNg1GTYkm41bVbZt8wDbs/2aITjhHE TGctWrlRacnUGRRn/b++f3o7sPbNG7yaJD6hPzk5b44G+7j0Q9SaZLjrDWlndJlvAHSq5A ZYCP8Pj6ZFILnBoq1ywR+6TMmavJR9x1HbCBEjs43HTb3WZuRXVT8wvyJ0BWHfdAv00HHC iP+0dXjTuFAFc1hQOo+iDNt0kMNPRSEp5CQx3fg9igBMmFRzDBZgx1cFzLUOBg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 33FD421E30; Fri, 8 Apr 2022 09:03:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23893rH6015151; Fri, 8 Apr 2022 09:03:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23893r0U015150; Fri, 8 Apr 2022 09:03:53 GMT (envelope-from git) Date: Fri, 8 Apr 2022 09:03:53 GMT Message-Id: <202204080903.23893r0U015150@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: eecae51acfc0 - stable/12 - pw.8: Use more appropriate mdoc macros List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: eecae51acfc09397dd481d7b4130fd690e1ac68c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649408633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xb88WQsXLQyg5bgr0jhA5zdSHQlGlika781xbPgpw/4=; b=SvsoxmZkfhz6PyHig7wV9GZj6reIUyMIBuiiT3QFJasZNHtD1m7GvpKUiqhV2rLjAkF3RG AnX5LzgKdaUbqQk2m0nSOHuVhikDnnzSQuBW49OBDUm5pY1F0xgbYNnKxlP1frzUbo1XoW aqhiNqH48l6yPvwpcQkzIJlHMZc5bUlaGMMI8gZpWHJVjdBVmDT70cvlUNQU9mKFoJp1ha DUDz4vmv2/u3YYpKkuAtzhpeq2r796Msw8awhDtt+buIbvcYFgBi3GDbr967rnUjIu6a4x UsECwEKujgNIQlwC0l6YdDae5U0MN5opAtc94B6ZN++QwMrHaEBBVApjobrNAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649408633; a=rsa-sha256; cv=none; b=kAuNksV0JBoAjURKuL/al4KmYfPWSFPfZ6UduO0YxgGqbBPwjfBP7zQLBb4R4x4/Rzruj9 9J6LN/t6QUm8beYXtmrpm2tEmAXqHrg0UH+Y4nq06+wAvWjJHt+PsHpYKtnfJlfFTAk65v s+Y1io1fpqINWgB1VUZawS2UNwGfW/jFUfhxGlOSiauEiJBY4C6erbZ2R64kTVfjsBig9S mQ3NUD7AueIOtLpAk71hlLgBfkJmuXTiUokNy8M6OpwkgVRmJdj1YrMo7AS6ZG6c7yJQwS 6h6OvLgb18tFMAW+WwXETNAU72dMvxTKRpzWNO/hkNCmVp+XX/i+IfYOn18epg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=eecae51acfc09397dd481d7b4130fd690e1ac68c commit eecae51acfc09397dd481d7b4130fd690e1ac68c Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-04-01 11:52:39 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2022-04-08 08:59:34 +0000 pw.8: Use more appropriate mdoc macros MFC after: 1 week (cherry picked from commit 77fd0356efa8a956a616ca8d7a51701cec426c88) --- usr.sbin/pw/pw.8 | 107 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 58 insertions(+), 49 deletions(-) diff --git a/usr.sbin/pw/pw.8 b/usr.sbin/pw/pw.8 index f7b6a8a4830b..2ea9729c1031 100644 --- a/usr.sbin/pw/pw.8 +++ b/usr.sbin/pw/pw.8 @@ -321,9 +321,9 @@ databases. .El .Sh USER OPTIONS The following options apply to the -.Ar useradd +.Cm useradd and -.Ar usermod +.Cm usermod commands: .Bl -tag -width "-G grouplist" .It Oo Fl n Oc Ar name @@ -332,15 +332,16 @@ Required unless is given. Specify the user/account name. In the case of -.Ar usermod -can be a uid. +.Cm usermod +can be a +.Ar uid . .It Fl u Ar uid Required if .Ar name is not given. Specify the user/account numeric id. In the case of -.Ar usermod +.Cm usermod if paired with .Ar name , changes the numeric id of the named user/account. @@ -349,22 +350,22 @@ Usually, only one of these options is required, as the account name will imply the uid, or vice versa. However, there are times when both are needed. For example, when changing the uid of an existing user with -.Ar usermod , +.Cm usermod , or overriding the default uid when creating a new account with -.Ar useradd . +.Cm useradd . To automatically allocate the uid to a new user with -.Ar useradd , +.Cm useradd , then do .Em not use the .Fl u option. Either the account or userid can also be provided immediately after the -.Ar useradd , -.Ar userdel , -.Ar usermod +.Cm useradd , +.Cm userdel , +.Cm usermod , or -.Ar usershow +.Cm usershow keywords on the command line without using the .Fl n or @@ -444,7 +445,7 @@ This option instructs .Nm to attempt to create the user's home directory. While primarily useful when adding a new account with -.Ar useradd , +.Cm useradd , this may also be of use when moving an existing user's home directory elsewhere on the file system. The new home directory is populated with the contents of the @@ -459,7 +460,7 @@ prefix will be stripped. When .Fl m is used on an account with -.Ar usermod , +.Cm usermod , existing configuration files in the user's home directory are .Em not overwritten from the skeleton files. @@ -469,7 +470,7 @@ it will by default be a subdirectory of the .Ar basehome directory as specified by the .Fl b -option (see below), bearing the name of the new account. +option, bearing the name of the new account. This can be overridden by the .Fl d option on the command line, if desired. @@ -556,7 +557,7 @@ suitable for writing directly to the password database. .El .Pp It is possible to use -.Ar useradd +.Cm useradd to create a new account that duplicates an existing user id. While this is normally considered an error and will be rejected, the .Fl o @@ -568,7 +569,7 @@ directory, different shell) while providing basically the same permissions for access to the user's files in each account. .Pp The -.Ar useradd +.Cm useradd command also has the ability to set new user and group defaults by using the .Fl D option. @@ -653,8 +654,8 @@ See description of .Fl k for naming conventions of these files. .It Xo -.Fl u Ar min , Ns Ar max , -.Fl i Ar min , Ns Ar max +.Fl u Ar min Ns Cm \&, Ns Ar max , +.Fl i Ar min Ns Cm \&, Ns Ar max .Xc Set the minimum and maximum user and group ids allocated for new accounts and groups created by @@ -678,20 +679,20 @@ accounts. is one of: .Pp .Bl -tag -width random -offset indent -compact -.It no +.It Cm no disable login on newly created accounts -.It yes +.It Cm yes force the password to be the account name -.It none +.It Cm none force a blank password -.It random +.It Cm random generate a random password .El .Pp The -.Ql \&random +.Cm random or -.Ql \&no +.Cm no methods are the most secure; in the former case, .Nm generates a password and prints it to stdout, @@ -700,7 +701,7 @@ to select their own .Pq possibly poorly chosen password. The -.Ql \&no +.Cm no method requires that the superuser use .Xr passwd 1 to render the account accessible with a password. @@ -718,7 +719,7 @@ servers. .El .Pp The -.Ar userdel +.Cm userdel command has three distinct options. The .Fl n Ar name @@ -736,7 +737,9 @@ The utility errs on the side of caution when removing files from the system. Firstly, it will not do so if the uid of the account being removed is also used by -another account on the system, and the 'home' directory in the password file is +another account on the system, and the +.Dq home +directory in the password file is a valid path that commences with the character .Ql \&/ . Secondly, it will only remove files and directories that are actually owned by @@ -746,26 +749,28 @@ will be removed. If any additional cleanup work is required, this is left to the administrator. .El .Pp -Mail spool files and crontabs are always removed when an account is deleted as +Mail spool files and +.Xr crontab 5 +files are always removed when an account is deleted as these are unconditionally attached to the user name. Jobs queued for processing by -.Ar at +.Xr at 1 are also removed if the user's uid is unique and not also used by another account on the system. .Pp The -.Ar usermod +.Cm usermod command adds one additional option: .Bl -tag -width "-G grouplist" .It Fl l Ar newname This option allows changing of an existing account name to -.Ql \&newname . +.Ar newname . The new name must not already exist, and any attempt to duplicate an existing account name will be rejected. .El .Pp The -.Ar usershow +.Cm usershow command allows viewing of an account in one of two formats. By default, the format is identical to the format used in .Pa /etc/master.passwd @@ -789,7 +794,7 @@ forces to print the details of an account even if it does not exist. .Pp The command -.Ar usernext +.Cm usernext returns the next available user and group ids separated by a colon. This is normally of interest only to interactive scripts or front-ends that use @@ -809,7 +814,7 @@ Required unless is given. Specify the group name. In the case of -.Ar groupmod +.Cm groupmod can be a gid. .It Fl g Ar gid Required if @@ -817,7 +822,7 @@ Required if is not given. Specify the group numeric id. In the case of -.Ar groupmod +.Cm groupmod if paired with .Ar name , changes the numeric id of the named group. @@ -829,8 +834,10 @@ You will only need to use both when setting a specific group id against a new group or when changing the uid of an existing group. .It Fl M Ar memberlist This option provides an alternative way to add existing users to a -new group (in groupadd) or replace an existing membership list (in -groupmod). +new group +.Pq in Cm groupadd +or replace an existing membership list +.Pq in Cm groupmod . .Ar memberlist is a comma separated list of valid and existing user names or uids. .It Fl m Ar newmembers @@ -853,7 +860,7 @@ Login names or user ids may be used, and duplicate users are silently eliminated. .El .Pp -.Ar groupadd +.Cm groupadd also has a .Fl o option that allows allocation of an existing group id to a new group. @@ -862,21 +869,21 @@ and this option overrides the check for duplicate group ids. There is rarely any need to duplicate a group id. .Pp The -.Ar groupmod +.Cm groupmod command adds one additional option: .Bl -tag -width "-m newmembers" .It Fl l Ar newname This option allows changing of an existing group name to -.Ql \&newname . +.Ar newname . The new name must not already exist, and any attempt to duplicate an existing group name will be rejected. .El .Pp Options for -.Ar groupshow +.Cm groupshow are the same as for -.Ar usershow , +.Cm usershow , with the .Fl g Ar gid replacing @@ -885,11 +892,11 @@ to specify the group id. The .Fl 7 option does not apply to the -.Ar groupshow +.Cm groupshow command. .Pp The command -.Ar groupnext +.Cm groupnext returns the next available group id on standard output. .Sh USER LOCKING The @@ -899,13 +906,13 @@ supports a simple password locking mechanism for users; it works by prepending the string .Ql *LOCKED* to the beginning of the password field in -.Pa master.passwd +.Xr master.passwd 5 to prevent successful authentication. .Pp The -.Ar lock +.Cm lock and -.Ar unlock +.Cm unlock commands take a user name or uid of the account to lock or unlock, respectively. The @@ -919,7 +926,9 @@ For a summary of options available with each command, you can use .Dl pw [command] help For example, .Dl pw useradd help -lists all available options for the useradd operation. +lists all available options for the +.Cm useradd +operation. .Pp The .Nm