Page MenuHomeFreeBSD

Add options to allow adduser(8) to create ZFS datasets for each new user
AbandonedPublic

Authored by allanjude on Apr 10 2015, 4:57 AM.

Details

Reviewers
dteske
dvl
roberto
Summary

rmuser(8) sloppily detects ZFS, and instructs the user to manually remove the ZFS dataset

Note: rmuser does not remove the datasets for a few reasons:
a) don't want to blindly recursively destroy the dataset
b) If the user being removed does not have a dataset, we detect the parent dataset, don't want to remove the entire home directory

Diff Detail

Repository
rS FreeBSD src repository
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

allanjude retitled this revision from to Add options to allow adduser(8) to create ZFS datasets for each new user.Apr 10 2015, 4:57 AM
allanjude updated this object.
allanjude edited the test plan for this revision. (Show Details)
allanjude added reviewers: dteske, dvl.
allanjude updated this revision to Diff 4774.
roberto edited edge metadata.Apr 10 2015, 1:38 PM

Looks OK to me. Are the three zfs related parameters asked at run-time or just taken on the command-line? Just did a test and nothing is asked, you might want to add them.

In D2272#5, @roberto wrote:

Looks OK to me. Are the three zfs related parameters asked at run-time or just taken on the command-line? Just did a test and nothing is asked, you might want to add them.

Michael Lucas and I discussed it and decided it didn't make sense to pester the user with another question during the creation of each new user. Not everyone uses ZFS, so the question wouldn't make sense for them, and if you are using ZFS, you likely want the answer to always be yes.

So, you can set the parameters via /etc/adduser.conf or via the command line (-z zroot/usr/home)
The 'properties' setting is optional, in most cases the properties can just be inherited from the parent dataset, but if you want per user quotas or reservations, you need to set them per dataset.

roberto edited edge metadata.Apr 10 2015, 4:38 PM
roberto accepted this revision.

OK, fine for me.

This revision is now accepted and ready to land.Apr 10 2015, 4:38 PM
allanjude abandoned this revision.Apr 19 2016, 4:12 AM