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.
Tags
None
Referenced Files
F101882558: D2272.id.diff
Tue, Nov 5, 3:45 AM
Unknown Object (File)
Thu, Oct 24, 5:46 PM
Unknown Object (File)
Wed, Oct 23, 10:49 AM
Unknown Object (File)
Wed, Oct 23, 8:15 AM
Unknown Object (File)
Thu, Oct 10, 7:21 PM
Unknown Object (File)
Sep 30 2024, 8:11 PM
Unknown Object (File)
Sep 26 2024, 10:30 PM
Unknown Object (File)
Sep 20 2024, 11:23 PM
Subscribers

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 - subversion
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

allanjude retitled this revision from to Add options to allow adduser(8) to create ZFS datasets for each new user.
allanjude updated this object.
allanjude edited the test plan for this revision. (Show Details)
allanjude added reviewers: dteske, dvl.

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.

OK, fine for me.

This revision is now accepted and ready to land.Apr 10 2015, 4:38 PM