I've been experimenting with systemd-homed, and have mostly successfully migrated an account over to it using the procedure here. When logging in conventionally, via login(1), everything works exactly as it should.
The specific problem I am having is with sessions created by means other than login(1).
One of these is the systemd-logind linger facility. When a user session is created by this (for example, after enabling it with loginctl enable-linger avatar and restarting), the services running in that session can't access the home directory (which is not mounted). Another is a user session created by machinectl, i.e., machinectl shell [email protected], which likewise can't access the home directory.
(In either case, it is possible for them to access the home directory if a working user session already exists, but of course it's impossible to guarantee that.)
The ultimate cause of this appears to be the lack of an entered password in either case, viz.:
Sep 05 18:02:24 pallas-wsl systemd-homed[702]: avatar: changing state inactive → activating-for-acquire
Sep 05 18:02:24 pallas-wsl systemd-homework[4380]: None of the supplied plaintext passwords unlock the user record's hashed passwords.
Sep 05 18:02:25 pallas-wsl systemd-homed[702]: Activation failed: Required key not available
Sep 05 18:02:25 pallas-wsl systemd-homed[702]: avatar: changing state activating-for-acquire → inactive
How can I make systemd-homed activate the home directory in these scenarios?