.\"
.\" $FreeBSD$
.\"
-.Dd April 23, 2016
+.Dd February 8, 2019
.Dt PW 8
.Os
.Sh NAME
default determined from
.Pa /etc/pw.conf
- normally
-.Pa /home
+.Pa /var
with the account name as a subdirectory.
.It Fl e Ar date
Set the account's expiration date.
.It Fl b Ar dir
Set the root directory in which user home directories are created.
The default value for this is
-.Pa /home ,
+.Pa /var ,
but it may be set elsewhere as desired.
.It Fl e Ar days
Set the default account expiration period in days.
A value of 0 suppresses automatic calculation of the expiry date.
.It Fl p Ar days
Set the default password expiration period in days.
+When
+.Fl D
+is used, the
+.Ar days
+argument is interpreted differently.
+It must be numeric and represents the number of days after creation
+that the account expires.
+A value of 0 suppresses automatic calculation of the expiry date.
.It Fl g Ar group
Set the default group for new users.
If a blank group is specified using
The login shell is set to
.Xr csh 1 .
A new home directory at
-.Pa /home/gsmith
+.Pa /var/gsmith
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
+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