diff options
author | Benedict Reuschling <bcr@FreeBSD.org> | 2019-02-08 22:10:40 +0000 |
---|---|---|
committer | Benedict Reuschling <bcr@FreeBSD.org> | 2019-02-08 22:10:40 +0000 |
commit | 76ab67765cfb3a27c6df12adef2e4995d201b3d2 (patch) | |
tree | 856cc8efb13658b79e7dc1cd174df2954950eb19 | |
parent | 68d1891dcd9562dd914b16bfb34223c430b16b3f (diff) | |
download | pw-darwin-76ab67765cfb3a27c6df12adef2e4995d201b3d2.tar.gz pw-darwin-76ab67765cfb3a27c6df12adef2e4995d201b3d2.tar.zst pw-darwin-76ab67765cfb3a27c6df12adef2e4995d201b3d2.zip |
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
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D19123
-rw-r--r-- | pw/pw.8 | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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 |