-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strategy to enroll existing manually created user datasets (like encrypted ones) #81
Comments
Oh, this isn’t supposed to happen, Let me have a look there, adduser and gnome-control-cener and anything that is using useradd should create the new datasets. That may be a regression in focal compared to eoan. I’m having a look.
Keep us posted! |
You’re right, I pushed a fix which will be building in focal shortly (shadow package 4.8.1-1ubuntu4) once accepted by the freeze. |
Thanks. I will try that out later. I just broke an installation and have to re-install because I played around too much.
… On 6. Apr 2020, at 09:45, Didier Roche ***@***.***> wrote:
Even more fun - and I did not try it yet: ubuntu does not create new zfs for new users but just creates new home-directories under /home which is in rpool/USERDATA thus they will not be able to save their homes. But that is a problem of ubuntu.
Oh, this isn’t supposed to happen, Let me have a look there, adduser and gnome-control-cener and anything that is using useradd should create the new datasets. That may be a regression in focal compared to eoan. I’m having a look.
How do I associate a zfs with a user, so that zsysctl knows what to do?
However, indeed, if you want special options like per dataset encryption, this isn’t supported directly with zsysctl yet for focal. You can associate it quite easily though:
get your current root dataset path: (with zfs mount for instance), let’s say it’s rpool/ROOT/ubuntu_12345678
Tag your newly created user dataset (which should start with username, for instance rpool/USERDATA/user1_abcdef to associate with the root pool: zfs set com.ubuntu.zsys:bootfs-datasets=rpool/ROOT/ubuntu_12345678 rpool/ROOT/ubuntu_12345678
That should be it, if you want to check that everything is alright:
if no zsysd is running, just run zsysctl show --full to list user datasets
if zsysd was still running (it’s exiting after one minute of idling), zsysctl service refresh && zsysctl show --full.
We should make an utility for this until we have a better user-experience for it.
Keep us posted!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Please keep breakikng it and report anything that is weird! :) |
I guess this is
Or mention it in the man-page of zsys. I didn't look up the zfs-properties because I totally didn't expect it there. |
meh. There are no real man-pages. And it seems you can only find out about that property with a
on a pre-existing dataset (preferably a home) |
This seems to work. |
Oh right, sorry about the typo :) And indeed, you need to deassociate curent dataset. The shadow package is uploaded which will fix "create userdataset on demand", but manual ones like you did won't until we have a better way to enroll user dataset. I’ll retitle this bug for this. |
Blog posts are great but having manuals on my system without the need to google are far better because I do not have to rely on search engines but use the tools available on my system.
… On 7. Apr 2020, at 08:48, Didier Roche ***@***.***> wrote:
Oh right, sorry about the typo :) And indeed, you need to deassociate curent dataset.
There will be a series of blog posts (more and less technical) once 20.04 LTS is out to cover those aspects.
The shadow package is uploaded which will fix "create userdataset on demand", but manual ones like you did won't until we have a better way to enroll user dataset. I’ll retitle this bug for this.
Keep bug reports coming if you spot anything else bad!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
It’s hard as implementer to know what is really technical details or what could be interesting to advanced users who wants to understand a little bit more and to some manual work, while still being compatible with the design. If I write those blog posts would you be interested in helping crafting those manuals (probably in markdown) here so that we can ship them as man pages in the distro? |
I might try to help out. I am not a technical writer but I can give it a a shot.
… On 7. Apr 2020, at 08:56, Didier Roche ***@***.***> wrote:
It’s hard as implementer to know what is really technical details or what could be interesting to advanced users who wants to understand a little bit more and to some manual work, while still being compatible with the design.
If I write those blog posts would you be interested in helping crafting those manuals (probably in markdown) here so that we can ship them as man pages in the distro?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I first tried |
Those are hidden commands on purpose: just to change the user home directory, please use rather The command is hooked up to |
I had the same use-case as the issue creator: I manually created a new encrypted home volume and renamed it with |
Agreed! But the fix is thus different: set-home is just a workaround, we need a dedicated command to enroll existing home directory (if created under I think something like On encryption, agreed, and this is why we are working on bringing to 20.10 encryption as an easy option by default! (This will be probably backported to 20.04.x release). |
Deleted user have all their datasets with an empty bootfs dataset and ends up in the unmanaged datasets list. We clean up any of them using GC when the value com.ubuntu.zsys:bootfs-datasets is empty, but was set. We ensure that any dependencies follow the same deletion rule first. Fixes: #81 Co-authored-by: Jean-Baptiste Lallement <jean-baptiste@ubuntu.com>
I have a similar problem. I installed Ubuntu 19.10 from scratch and set it up with ZFS. Since I wanted to encrypt my home directory (and possibly others) I set up an I also moved I have now updated to 20.04 and find that the choices I made with 19.04 result in I tried
|
I created a new dataset for a user, so that I can use zfs native encryption for the home. When I did zsysctl save it told me that there is no association for that user and did some autosave of the old filesystem. Now I destroyed the old file system and now zsysctl errors out because the file system does not exist.
But there is the encrypted file system and its mount point is the home of the user.
How do I associate a zfs with a user, so that zsysctl knows what to do?
Even more fun - and I did not try it yet: ubuntu does not create new zfs for new users but just creates new home-directories under /home which is in rpool/USERDATA thus they will not be able to save their homes. But that is a problem of ubuntu.
The text was updated successfully, but these errors were encountered: