svn commit: r343921 - head/usr.sbin/pw

Benedict Reuschling bcr at FreeBSD.org
Fri Feb 8 22:10:41 UTC 2019


Author: bcr (doc committer)
Date: Fri Feb  8 22:10:40 2019
New Revision: 343921
URL: https://svnweb.freebsd.org/changeset/base/343921

Log:
  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

Modified:
  head/usr.sbin/pw/pw.8

Modified: head/usr.sbin/pw/pw.8
==============================================================================
--- head/usr.sbin/pw/pw.8	Fri Feb  8 20:42:49 2019	(r343920)
+++ head/usr.sbin/pw/pw.8	Fri Feb  8 22:10:40 2019	(r343921)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 10, 2017
+.Dd February 8, 2019
 .Dt PW 8
 .Os
 .Sh NAME
@@ -978,6 +978,12 @@ pw useradd -n gsmith -c "Glurmo Smith" -s /bin/csh -m 
 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


More information about the svn-src-all mailing list