freebsd-src/usr.sbin/pw
Mike Karels d2f1f71ec8 pw userdel: destroy home dataset if empty
When removing a user's home directory, if the directory is a ZFS
dataset, it cannot be removed.  If the directory has been emptied,
use "zfs destroy" to destroy it.  This complements the automatic
dataset creation in adduser.  Note that datasets within the directory
and snapshots are not handled, as the complete path is not constructed.

While here, add waitpid() calls to rmat() and pw_user_del().

Reviewed by:	des
Differential Revision:	https://reviews.freebsd.org/D45348
2024-05-29 18:55:14 -05:00
..
tests pw: Test home directory ownership and mode. 2024-05-06 18:18:50 +02:00
bitmap.c Purge more stray embedded $FreeBSD$ strings 2023-09-25 07:54:56 -07:00
bitmap.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
cpdir.c Purge more stray embedded $FreeBSD$ strings 2023-09-25 07:54:56 -07:00
grupd.c Purge more stray embedded $FreeBSD$ strings 2023-09-25 07:54:56 -07:00
Makefile Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
psdate.c Purge more stray embedded $FreeBSD$ strings 2023-09-25 07:54:56 -07:00
psdate.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
pw_conf.c Purge more stray embedded $FreeBSD$ strings 2023-09-25 07:54:56 -07:00
pw_group.c pw: Don't silently ignore unparsed command line arguments. 2024-05-06 18:18:43 +02:00
pw_log.c Purge more stray embedded $FreeBSD$ strings 2023-09-25 07:54:56 -07:00
pw_nis.c Purge more stray embedded $FreeBSD$ strings 2023-09-25 07:54:56 -07:00
pw_user.c pw userdel: destroy home dataset if empty 2024-05-29 18:55:14 -05:00
pw_utils.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
pw_vpw.c Purge more stray embedded $FreeBSD$ strings 2023-09-25 07:54:56 -07:00
pw.8 pw userdel: destroy home dataset if empty 2024-05-29 18:55:14 -05:00
pw.c pw: Don't silently ignore unparsed command line arguments. 2024-05-06 18:18:43 +02:00
pw.conf.5 Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
pw.h pw: Don't silently ignore unparsed command line arguments. 2024-05-06 18:18:43 +02:00
pwupd.c Purge more stray embedded $FreeBSD$ strings 2023-09-25 07:54:56 -07:00
pwupd.h pw userdel: destroy home dataset if empty 2024-05-29 18:55:14 -05:00
README Remove $FreeBSD$: one-line bare tag 2023-08-16 11:55:20 -06:00
rm_r.c pw userdel: destroy home dataset if empty 2024-05-29 18:55:14 -05:00
strtounum.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00

pw is a command-line driven passwd/group editor utility that provides
an easy and safe means of modifying of any/all fields in the system
password files, and has an add, modify and delete mode for user and
group records. Command line options have been fashioned to be similar
to those used by the Sun/shadow commands: useradd, usermod, userdel,
groupadd, groupmod, groupdel, but combines all operations within the
single command `pw'.

User add mode also provides a means of easily setting system useradd
defaults (see pw.conf.5), so that adding a user is as easy as issuing
the command "pw useradd <loginid>". Creation of a unique primary
group for each user and automatic membership in secondary groups
is fully supported.

This program may be FreeBSD specific, but should be trivial to port to
other bsd4.4 variants.

Author: David L. Nugent, <davidn@blaze.net.au>