FS#66475 - [systemd][cryptsetup][json-c] homectl cannot create users with LUKS storage

Attached to Project: Arch Linux
Opened by nl6720 (nl6720) - Thursday, 30 April 2020, 07:59 GMT
Last edited by Christian Hesse (eworm) - Thursday, 30 April 2020, 12:19 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Dave Reisner (falconindy)
Christian Hesse (eworm)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Following the instructions in the wiki ( https://wiki.archlinux.org/index.php/Systemd-homed ), I tried to create a user with its home storage set to LUKS by running:

homectl create testuser2 --storage=luks

After entering the new user's password twice, I got:

Failed to create user home: Failed to execute operation: Invalid argument

Journal shows:

apr 30 10:50:44 archvm1 systemd-homework[1759]: Allocating image file completed.
apr 30 10:50:44 archvm1 systemd-homework[1759]: Writing of partition table completed.
apr 30 10:50:44 archvm1 systemd-homework[1759]: Setting up loopback device /dev/loop2 completed.
apr 30 10:50:44 archvm1 systemd-udevd[1761]: loop2: Failed to process device, ignoring: Resource temporarily unavailable
apr 30 10:50:44 archvm1 systemd-udevd[1761]: loop2: Failed to process device, ignoring: Resource temporarily unavailable
apr 30 10:50:44 archvm1 systemd-udevd[1761]: loop2: Failed to process device, ignoring: Resource temporarily unavailable
apr 30 10:50:45 archvm1 systemd-homework[1759]: Cannot wipe header on device /dev/loop2.
apr 30 10:50:45 archvm1 systemd-homework[1759]: Failed to format LUKS image: Invalid argument
apr 30 10:50:45 archvm1 systemd-udevd[1761]: loop2: Failed to process device, ignoring: Resource temporarily unavailable
apr 30 10:50:45 archvm1 systemd-udevd[1761]: loop2: Failed to process device, ignoring: Resource temporarily unavailable
apr 30 10:50:45 archvm1 systemd-homed[747]: Worker reported error code EINVAL.
apr 30 10:50:45 archvm1 systemd-homed[747]: Operation on testuser2 failed: Invalid argument

If I downgrade to cryptsetup 2.3.1-1 and json-c 0.13.1-3, the issue is gone and everything works.

Additional info:
* package version(s)
* config and/or log files etc.
* link to upstream bug report, if any
systemd 245.5-2
cryptsetup 2.3.1-2
json-c 0.14-1


Steps to reproduce:
Enable systemd-homed.service,
Set up PAM: https://wiki.archlinux.org/index.php/Systemd-homed#Enabling_PAM_modules ,
Reboot,
Run `homectl create testuser2 --storage=luks`
This task depends upon

Closed by  Christian Hesse (eworm)
Thursday, 30 April 2020, 12:19 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#66477 
Comment by freswa (frederik) - Thursday, 30 April 2020, 11:24 GMT Comment by nl6720 (nl6720) - Thursday, 30 April 2020, 11:33 GMT
systemd issue 15273 is about home on a partition (it uses --image-path=). I'm trying to use the default behavior of --storage=luks, i.e. LUKS on a loopback device.

Loading...