From nobody Fri Apr 01 22:52:05 2022 X-Original-To: dev-commits-src-main@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 C6A921A525D9; Fri, 1 Apr 2022 22:52:06 +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 4KVb5f255tz4hZ8; Fri, 1 Apr 2022 22:52:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648853526; 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=Tx7vGuKkBrjCh09V5laoV7WCfUgPf3qEgpKzb7M1Gzg=; b=L3eFfY13Pj7wjASCkjoA5AXLBg9TzW/ywFHGaNpI3h/wRqYremwfbe20cFjSKk1rNyhZZy 08kVPss03FxFCizrVQo8VNCHmhZqoyfM6TB1v4urjbUwDWnFYWPqiWq0Hdo+WWoxGh+mj7 6waI+32LXZ49dBg4Gn3A9e3x35wzZznBEsn+40wLt+2IjiXqaEZ69O+nFBnjlI47RP6e37 B5N0RFMVcR3JEqVxPD40RN8ZnGs0z4RTuCQ6xI6fDnn3W8kyP5lCBQZob32/JOOx1NOgYD F5KJm/SY3FjLT7pqUzrzGelmCo6pHGE5ISPEYcWqrsTEmk2vGXuM2A5Q88sKZA== 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 E07391CDEC; Fri, 1 Apr 2022 22:52:05 +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 231Mq5or095004; Fri, 1 Apr 2022 22:52:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 231Mq5fW095003; Fri, 1 Apr 2022 22:52:05 GMT (envelope-from git) Date: Fri, 1 Apr 2022 22:52:05 GMT Message-Id: <202204012252.231Mq5fW095003@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 77fd0356efa8 - main - pw.8: Use more appropriate mdoc macros List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 77fd0356efa8a956a616ca8d7a51701cec426c88 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648853526; 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=Tx7vGuKkBrjCh09V5laoV7WCfUgPf3qEgpKzb7M1Gzg=; b=dJx7E7PfTeu+me9rvwLgLH56WO41GgJ/0wk2fmBoIao6lc8B3UOBbWPYDUebQCVOJgSnVG Dpqd3FITrLzaskiQObjVEfHzbKkGcnUmZ+K2JckXITw5fkX3jw5uF/SQP8tdF30wRqS+q4 nhRFLgwi3buWKi7RJV1dlRF6+MKHBFJM6ycAmexBvi/ifXhrybtvtRukUNEBOvDCrZAUtn Zr+c1+rWo6H20lpLAUNZEjijSn+ff/uvlpavQmg6POqfsHELLx9ca6lrw4kFWsB2VRt5WM KGLlrlkN2RkD07fbDqZ2mMOyOQLrvtsF6hPro3Aj0jOaopZT1L7Rfr0/EMJWIQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648853526; a=rsa-sha256; cv=none; b=djeTD4Af4x1l0K29NTrj37tvm9qBGpQGY4bujkVYVD3Vep74PEMQP/3MG+rjMrWe2nXUex +FsDSO30Fu/CS/1/5tr3heYx/r1+n2qTH5QdM3E94Vh1QLAaVbFModTTO/P+EtbodGyc+n KZCI/ZBe9aHeMN6AZE19pPWUa29CnpSZjbefMbjjkmytezreDX8n3vCWwczRLTHkZ9MBHl 0CVEHBj1yj8rNESwBq8RfVWBKKMMKmHJ6EXdSQgzmknTI28PSlwJcfgeIE/XeZKsLAXZmP 2dHKQWmqjHHURuowBagxcCz95+nfdDaOu2x7hrIm8pkUu8CU+4YDo/dvWpR6aA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=77fd0356efa8a956a616ca8d7a51701cec426c88 commit 77fd0356efa8a956a616ca8d7a51701cec426c88 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2022-04-01 11:52:39 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2022-04-01 22:49:53 +0000 pw.8: Use more appropriate mdoc macros MFC after: 1 week --- 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