]> git.cameronkatri.com Git - pw-darwin.git/commitdiff
Add an example to pw.8 about how to add an existing user to a group.
authorBenedict Reuschling <bcr@FreeBSD.org>
Fri, 8 Feb 2019 22:10:40 +0000 (22:10 +0000)
committerBenedict Reuschling <bcr@FreeBSD.org>
Fri, 8 Feb 2019 22:10:40 +0000 (22:10 +0000)
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
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D19123

pw/pw.8

diff --git a/pw/pw.8 b/pw/pw.8
index e848979ee519bca3391824b21e11ba63ab45f460..18930fbf22855f7c05b5f28548061bb3e2487ba7 100644 (file)
--- a/pw/pw.8
+++ b/pw/pw.8
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 10, 2017
+.Dd February 8, 2019
 .Dt PW 8
 .Os
 .Sh NAME
@@ -979,6 +979,12 @@ Delete the gsmith user and their home directory, including contents.
 .Bd -literal -offset indent
 pw userdel -n gsmith -r
 .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
 .Nm