Bug 212407 - Feature Request: ZFS integration with pw(8)
Summary: Feature Request: ZFS integration with pw(8)
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
Depends on:
Reported: 2016-09-06 08:46 UTC by Xin LI
Modified: 2016-09-06 08:46 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Xin LI freebsd_committer 2016-09-06 08:46:01 UTC
(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[1].  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).

[1] A user should have 'mount' and 'snapshot' permissions.