Public bug reported:

Part of the zsys spec is creating/associating one user dataset for each
HOME user.

As zsys is an official experimentation for 19.10, we would like to
include this feature in a safe way, and reachable for any tool creating
users (adduser, gnome-control-center, ubiquity…). Those are using
useradd under the scene.

For this, the proposed implementation:
- patch useradd trying to execute "zsys useradd create USER HOMEDIR". If zsys 
isn't present or zsys returns a status code != 0 (which will be the case if the 
running system isn't a zsys one: pure zfs or non zfs like / on ext4), it will 
fallback to mkdir. Then the code does the usual chmod()
- patch usermod, trying as well to execute "zsys useradd rename-home OLDHOME 
NEWHOME". Same failing reason (not a zsys system, not installed, OLDHOME isn't 
a zsys handled datasets) and fallback to rename(). Then the code does the usual 
chmod().

Tested with and without zsys installed, the code does what we expect.

I'm attaching the shadow (useradd/usermod) patches, as you can see it's very 
minimal.
A new ZSYS release will be needed (https://github.com/ubuntu/zsys). As you can 
see, there are quite some commits since the last release, but it's all baked 
(as usual) by a huge suite of tests (in ZFS and machine layers) with corner 
cases tested and such. I'm confident on that change.

** Affects: shadow (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: zsys (Ubuntu)
     Importance: Undecided
         Status: New

** Patch added: "1015_add_zsys_support.patch"
   
https://bugs.launchpad.net/bugs/1842902/+attachment/5286949/+files/1015_add_zsys_support.patch

** Also affects: shadow (Ubuntu)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to shadow in Ubuntu.
https://bugs.launchpad.net/bugs/1842902

Title:
  FFe: create zfs dataset for each user automatically

Status in shadow package in Ubuntu:
  New
Status in zsys package in Ubuntu:
  New

Bug description:
  Part of the zsys spec is creating/associating one user dataset for
  each HOME user.

  As zsys is an official experimentation for 19.10, we would like to
  include this feature in a safe way, and reachable for any tool
  creating users (adduser, gnome-control-center, ubiquity…). Those are
  using useradd under the scene.

  For this, the proposed implementation:
  - patch useradd trying to execute "zsys useradd create USER HOMEDIR". If zsys 
isn't present or zsys returns a status code != 0 (which will be the case if the 
running system isn't a zsys one: pure zfs or non zfs like / on ext4), it will 
fallback to mkdir. Then the code does the usual chmod()
  - patch usermod, trying as well to execute "zsys useradd rename-home OLDHOME 
NEWHOME". Same failing reason (not a zsys system, not installed, OLDHOME isn't 
a zsys handled datasets) and fallback to rename(). Then the code does the usual 
chmod().

  Tested with and without zsys installed, the code does what we expect.

  I'm attaching the shadow (useradd/usermod) patches, as you can see it's very 
minimal.
  A new ZSYS release will be needed (https://github.com/ubuntu/zsys). As you 
can see, there are quite some commits since the last release, but it's all 
baked (as usual) by a huge suite of tests (in ZFS and machine layers) with 
corner cases tested and such. I'm confident on that change.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/shadow/+bug/1842902/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to