ZFS adduser in 14.1 adds ZFS dataset : zroot/home/username

Dear freebsdesians,

I upgraded to 14.1 using the netdisk and I encountered some unexpected issues while adding and removing users.

adduser doesn't ask to add a zsf dataset for your users, it just adds.
rmuser doesn't remove the dataset, so the user remains in etc/passwd (you can't add a user with the same name without running zfs destroy zroot/home/username).

I may be a bit behind on RingTFM, but wouldn't it be nice to ask if you want a separate dataset if you add a user, just as you're being asked about the home directory (that rmuser asks if it should be removed too)?
 
rmuser doesn't remove the dataset, so the user remains in etc/passwd (you can't add a user with the same name without running zfs destroy zroot/home/username).
I think this is a bug. But, conversely at what you state, the removed user doesn't remain in /etc/passwd.

If you answer 'yes' to this :
Remove user's home directory (/home/user)?
rmuser MUST destroy the corresponding dataset.
 
I think this is a bug. But, conversely at what you state, the removed user doesn't remain in /etc/passwd.

If you answer 'yes' to this :

rmuser MUST destroy the corresponding dataset.

If I remember correctly I kept the /home-dir for that user running rmuser.
So if you keep the homedir you still keep the user since the zfs-dataset is not removed.

The mixup of mountpoints and usermanagement seems to break the rmuser function in this case.
 
During installation of the operating system you're asked if you want to add a user. which you usually want, because you need someone in wheel.
There's no option here to avoid being mounted on this user's homedir.

It's from here all sorts of conundrums followed, including having to cycle to the datacentre (it's a dutch server).
8-)
 
If I remember correctly I kept the /home-dir for that user running rmuser.
So if you keep the homedir you still keep the user since the zfs-dataset is not removed.

The mixup of mountpoints and usermanagement seems to break the rmuser function in this case.
Keeping the home-dir for the user on a UFS I think gets rid of the user in /etc/passwd and related but the physical directory is kept.
ZFS, the mount point is a property of the dataset for the user, so keeping the home-dir for the user should logically keep the dataset (and corresponding mount point property) but should get rid of the user in /etc/passwd and related.
Is that what is happening?
If so, I think the behavior is consistent in rmuser when you do not say "yes" to removing user home-dir.
Now if on ZFS you say "yes" to remove user /home-dir the dataset should also get removed, just like on UFS the directory should get removed.
Is that what happens?
The only thing that may be interesting is the manpage for rmuser states "...removes user's home directory if it is owned by the user...". So is the user dataset owned by the user? That could be the question.
 
Just to check I installed 14.1 on an old PC. I was wrong; the misunderstanding resulting from a premature terminated ssh-connection earlier. I totally forgot I was logged in as the user I was trying to remove.
When removing a user and keeping the home dir the user is removed from /etc/passwd as he/she should be.

Sorry for the stir, guys (and gals).

I do still think automatic mounting of homedirs isn't the greatest innovation ever seen in FreeBSD-history.
 
Back
Top