From owner-svn-src-all@freebsd.org Mon Feb 11 17:48:53 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07DAC14DED93; Mon, 11 Feb 2019 17:48:53 +0000 (UTC) (envelope-from bcr@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 994F681DB7; Mon, 11 Feb 2019 17:48:52 +0000 (UTC) (envelope-from bcr@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 8B8EB33BE; Mon, 11 Feb 2019 17:48:52 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x1BHmqU5009847; Mon, 11 Feb 2019 17:48:52 GMT (envelope-from bcr@FreeBSD.org) Received: (from bcr@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1BHmqht009846; Mon, 11 Feb 2019 17:48:52 GMT (envelope-from bcr@FreeBSD.org) Message-Id: <201902111748.x1BHmqht009846@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bcr set sender to bcr@FreeBSD.org using -f From: Benedict Reuschling Date: Mon, 11 Feb 2019 17:48:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r344017 - stable/11/usr.sbin/pw X-SVN-Group: stable-11 X-SVN-Commit-Author: bcr X-SVN-Commit-Paths: stable/11/usr.sbin/pw X-SVN-Commit-Revision: 344017 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 994F681DB7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.939,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Feb 2019 17:48:53 -0000 Author: bcr (doc committer) Date: Mon Feb 11 17:48:52 2019 New Revision: 344017 URL: https://svnweb.freebsd.org/changeset/base/344017 Log: MFC r343921: Add an example to pw.8 about how to add an existing user to a group. Instead of using pw to modify group membership, users often edit /etc/group by hand, which is discouraged. Provide an example of adding a user to the wheel group, which is a common use case. I'm using a different user here as in the previous example as that deleted the user (although the examples don't necessarily have to be followed in order). Reviewed by: rgrimes,0mp Approved by: 0mp Differential Revision: https://reviews.freebsd.org/D19123 Modified: stable/11/usr.sbin/pw/pw.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/pw/pw.8 ============================================================================== --- stable/11/usr.sbin/pw/pw.8 Mon Feb 11 17:47:22 2019 (r344016) +++ stable/11/usr.sbin/pw/pw.8 Mon Feb 11 17:48:52 2019 (r344017) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 10, 2017 +.Dd February 8, 2019 .Dt PW 8 .Os .Sh NAME @@ -973,6 +973,12 @@ is created if it does not already exist. Finally, a random password is generated and displayed: .Bd -literal -offset indent pw useradd -n gsmith -c "Glurmo Smith" -s /bin/csh -m -w random +.Ed +.Pp +Add the existing user jsmith to the wheel group, +in addition to the other groups jsmith is already a member of. +.Bd -literal -offset indent +pw groupmod wheel -m jsmith .Ed .Sh EXIT STATUS The