(Creating a note for myself or someone who volunteers to work on it).
Currently, pw(8) is not ZFS aware. It would be nice if we can support ZFS in pw(8) that:
When adding user:
- If the home directory already exists, change ownership/group to the newly created user, and delegate certain permissions. Otherwise:
- If the parent directory of user's home directory is a ZFS, create a new ZFS automatically, and delegate certain permissions.
- Support an option to automatically populate quota, refquota, reservation and refreservation.
- Support an option to disable all these behavior.
When removing user:
- The home directory, if a ZFS, should be recursively destroyed when the home directory is supposed to be removed (e.g. userdel -r, and only when all files are owned by the user to be deleted).
 A user should have 'mount' and 'snapshot' permissions.