Understanding systemd-logind.service
There's a considerable difference in how this unit file is set up on RHEL-type systems and Ubuntu. Let's first look at the RHEL-type setup on the Alma machine.
The Alma Linux systemd-logind.service file
On the Alma machine, the [Unit]
section of the /lib/systemd/system/systemd-logind.service
file looks like this:
[Unit] Description=Login Service Documentation=man:systemd-logind.service(8) man:logind.conf(5) Documentation=https://www.freedesktop.org/wiki/Software/systemd/logind Documentation=https://www.freedesktop.org/wiki/Software/systemd/multiseat Wants=user.slice After=nss-user-lookup.target user.slice # Ask for the dbus socket. Wants=dbus.socket After=dbus.socket
Here's the breakdown:
Wants=user.slice
: This makes total sense. Due to systemd's tight integration with cgroups, a user slice must be created for every user who logs in.After=nss-user-lookup.target
: The Name Service Switch (NSS) determines...