Systemd Homed users and what does 'login' mean?
from to on 26 Nov 2023 21:07

From homectl:

Home directories managed by systemd-homed.service are usually in one of two states, … when “active” they are unlocked and mounted, and thus accessible to the system and its programs; … Activation happens automatically at login of the user

What does ‘login’ mean? For example, I created a user and tried to su -l test, but I got: cannot change directory to /home/test.

What is required to ‘activate’ a homed directory if not a login shell?

#linux on 26 Nov 2023 21:17 next collapse

Try using doas maybe on 26 Nov 2023 21:21 next collapse

Actually, I suspect ‘login’ refers to init and logind,

Back to the wiki to find out the steps during late userspace… on 26 Nov 2023 21:35 next collapse

It is the same as with all logins: It goes through the Pluggable Authentication Modules. So you need a service that uses PAM (they basically all do for a long time now) and the configuration of that service needs to include homed as an option to authenticate users. Check /etc/pam.d for the config files. on 27 Nov 2023 00:06 collapse
sudo machinectl login the-user@localhost

That will handle all the PAM stuff as if you actually logged in. on 27 Nov 2023 00:26 collapse

You can also ssh into localhost as the user if you have that set up