In the meantime, you can use autofs to do something close to this if
you like (sort of like the pam_mkhomedir module) -- you can have it
execute a script that returns the appropriate auto_user entry (given a
username as input). I wrote one a long time ago that would do a zfs
create if the dataset didn''t already exist (and assuming the homedir
for the user was /home/<USERNAME> from getent).
On Fri, May 14, 2010 at 8:15 AM, David Magda <dmagda at ee.ryerson.ca>
wrote:> I have a suggestion on modifying useradd(1M) and am not sure where to
> input it.
>
> Since individual ZFS file systems often make it easy to manage things,
> would it be possible to modify useradd(1M) so that if the
''base_dir'' is in
> a zpool, a new dataset is created for the user''s homedir?
>
> So if you specify "-m", a regular directory is created, but if
you specify
> (say) "-z", a new dataset is created. Usermod(1M) would also
probably have
> this option.
>
>
> GNU / Linux already as a "-Z" (capital-zed) option AFAICT:
>
> ? ? ? -Z, --selinux-user SEUSER
> ? ? ? ? ? The SELinux user for the user?s login. The default is
> ? ? ? ? ? to leave this field blank, which causes the system to
> ? ? ? ? ? select the default SELinux user.
>
>
> _______________________________________________
> zfs-discuss mailing list
> zfs-discuss at opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
>