1

Lingering has been enabled with

loginctl enable-linger

However, the user services do not start before logging in with the user. The services remain active when logging out again.

Is something extra needed to make it work when the user is not in the /etc/passwd file, but provided via NIS ?

The service is correctly added to the default.target, so this seems to be unrelated to Why doesn't my systemd user unit start at boot?

rubund
  • 271

2 Answers2

0

Interesting. network-online.target is not pulled in by default, so I don't think systemd-logind does anything with it; I guess logind doesn't know it needs to wait for your user details to become available...

Look up nss-user-lookup.target. Maybe you're supposed to create a drop-in file so that nss-user-lookup.target gains Wants= and After= on network-online.target.

The comment in nss-user-lookup.target does not sound like your needs were anticipated. "This exists mostly for implementations lacking socket/bus activation."

I believe SSSD implements caching for offline access. So maybe when you use SSSD it could just work, without having to make everything wait for wifi.

It looks like non-SSSD solutions can also provide caching for offline access, but the default setting might not cache for long enough: https://wiki.debian.org/LDAP/NSS#Offline_caching_of_NSS_with_nscd

sourcejedi
  • 50,249
0

The issue was resolved by adding the user to the /etc/passwd file and not solely rely on NIS.

rubund
  • 271