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