systemd/units
Franck Bui 278e815bfa logind: don't delay login for root even if systemd-user-sessions.service is not activated yet
If for any reason something goes wrong during the boot process (most likely due
to a network issue), system admins should be allowed to log in to the system to
debug the problem. However due to the login session barrier enforced by
systemd-user-sessions.service for all users, logins for root will be delayed
until a (dbus) timeout expires. Beside being confusing, it's not a nice user
experience to wait for an indefinite period of time (no message is shown) this
and also suggests that something went wrong in the background.

The reason of this delay is due to the fact that all units involved in the
creation of a user session are ordered after systemd-user-sessions.service,
which is subject to network issues. If root needs to log in at that time,
logind is requested to create a new session (via pam_systemd), which ultimately
ends up waiting for systemd-user-session.service to be activated. This has the
bad side effect to block login for root until the dbus call done by pam_systemd
times out and the PAM stack proceeds anyways.

To solve this problem, this patch orders the session scope units and the user
instances only after systemd-user-sessions.service for unprivileged users only.
2022-07-12 22:54:39 +01:00
..
user user: delegate cpu controller, assign weights to user slices 2022-07-05 14:40:01 +02:00
user-.slice.d logind: don't delay login for root even if systemd-user-sessions.service is not activated yet 2022-07-12 22:54:39 +01:00
user@0.service.d logind: don't delay login for root even if systemd-user-sessions.service is not activated yet 2022-07-12 22:54:39 +01:00
user@.service.d logind: don't delay login for root even if systemd-user-sessions.service is not activated yet 2022-07-12 22:54:39 +01:00
basic.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
blockdev@.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
bluetooth.target units: adjust Descriptions of various units 2021-06-30 13:25:16 +02:00
boot-complete.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
console-getty.service.in getty: Pass tty to use by agetty via stdin 2021-11-05 21:32:11 +00:00
container-getty@.service.in getty: Pass tty to use by agetty via stdin 2021-11-05 21:32:11 +00:00
cryptsetup-pre.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
cryptsetup.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
debug-shell.service.in meson: use jinja2 for unit templates 2021-05-19 10:24:43 +09:00
dev-hugepages.mount tree-wide: link to docs.kernel.org for kernel documentation 2022-07-04 19:56:53 +02:00
dev-mqueue.mount license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
emergency.service.in meson: use jinja2 for unit templates 2021-05-19 10:24:43 +09:00
emergency.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
exit.target logind, units: unit Descriptions should be capitalized 2021-06-30 13:25:16 +02:00
factory-reset.target units: fix factory-reset.target description 2022-03-14 22:39:32 +00:00
final.target units: correct description of final.target 2021-07-02 18:29:54 +02:00
first-boot-complete.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
getty-pre.target units: adjust Descriptions of various units 2021-06-30 13:25:16 +02:00
getty.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
getty@.service.in getty: Pass tty to use by agetty via stdin 2021-11-05 21:32:11 +00:00
graphical.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
halt.target units: adjust Descriptions of various units 2021-06-30 13:25:16 +02:00
hibernate.target units: adjust Descriptions of various units 2021-06-30 13:25:16 +02:00
hybrid-sleep.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
initrd-cleanup.service license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
initrd-fs.target units: change order of settings to match order in other similar unit 2021-04-20 19:11:07 +02:00
initrd-parse-etc.service license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
initrd-root-device.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
initrd-root-fs.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
initrd-switch-root.service license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
initrd-switch-root.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
initrd-udevadm-cleanup-db.service license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
initrd-usr-fs.target fstab-generator: if usr= is specified, mount it to /sysusr/usr/ first 2021-04-20 18:26:17 +02:00
initrd.target fstab-generator: if usr= is specified, mount it to /sysusr/usr/ first 2021-04-20 18:26:17 +02:00
integritysetup-pre.target Add stand-alone dm-integrity support 2021-10-15 10:19:54 -05:00
integritysetup.target Add stand-alone dm-integrity support 2021-10-15 10:19:54 -05:00
kexec.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
kmod-static-nodes.service.in units: shorten description of kmod-static-nodes.service 2021-06-30 13:25:16 +02:00
ldconfig.service license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
local-fs-pre.target units: adjust Descriptions of various units 2021-06-30 13:25:16 +02:00
local-fs.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
machine.slice license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
machines.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
meson-add-wants.sh tools: shellcheck-ify tool scripts 2021-09-30 12:27:06 +02:00
meson.build logind: don't delay login for root even if systemd-user-sessions.service is not activated yet 2022-07-12 22:54:39 +01:00
modprobe@.service units: remove the restart limit on the modprobe@.service 2022-06-21 18:15:34 +02:00
multi-user.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
network-online.target tree-wide: replace obsolete wiki links with systemd.io/manpages 2022-05-21 14:29:14 +02:00
network-pre.target tree-wide: replace obsolete wiki links with systemd.io/manpages 2022-05-21 14:29:14 +02:00
network.target tree-wide: replace obsolete wiki links with systemd.io/manpages 2022-05-21 14:29:14 +02:00
nss-lookup.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
nss-user-lookup.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
paths.target units: adjust Descriptions of various units 2021-06-30 13:25:16 +02:00
poweroff.target units: adjust Descriptions of various units 2021-06-30 13:25:16 +02:00
printer.target units: adjust Descriptions of various units 2021-06-30 13:25:16 +02:00
proc-sys-fs-binfmt_misc.automount tree-wide: link to docs.kernel.org for kernel documentation 2022-07-04 19:56:53 +02:00
proc-sys-fs-binfmt_misc.mount tree-wide: link to docs.kernel.org for kernel documentation 2022-07-04 19:56:53 +02:00
quotaon.service.in meson: use jinja2 for unit templates 2021-05-19 10:24:43 +09:00
rc-local.service.in meson: use jinja2 for unit templates 2021-05-19 10:24:43 +09:00
reboot.target units: adjust Descriptions of various units 2021-06-30 13:25:16 +02:00
remote-cryptsetup.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
remote-fs-pre.target units: adjust Descriptions of various units 2021-06-30 13:25:16 +02:00
remote-fs.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
remote-veritysetup.target dm-verity: Remove usage of integrity 2021-10-14 12:17:02 -05:00
rescue.service.in meson: use jinja2 for unit templates 2021-05-19 10:24:43 +09:00
rescue.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
rpcbind.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
serial-getty@.service.in getty: Pass tty to use by agetty via stdin 2021-11-05 21:32:11 +00:00
shutdown.target units: adjust Descriptions of various units 2021-06-30 13:25:16 +02:00
sigpwr.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
sleep.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
slices.target units: adjust Descriptions of various units 2021-06-30 13:25:16 +02:00
smartcard.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
sockets.target units: adjust Descriptions of various units 2021-06-30 13:25:16 +02:00
sound.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
suspend-then-hibernate.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
suspend.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
swap.target units: adjust Descriptions of various units 2021-06-30 13:25:16 +02:00
sys-fs-fuse-connections.mount tree-wide: link to docs.kernel.org for kernel documentation 2022-07-04 19:56:53 +02:00
sys-kernel-config.mount tree-wide: link to docs.kernel.org for kernel documentation 2022-07-04 19:56:53 +02:00
sys-kernel-debug.mount tree-wide: link to docs.kernel.org for kernel documentation 2022-07-04 19:56:53 +02:00
sys-kernel-tracing.mount tree-wide: link to docs.kernel.org for kernel documentation 2022-07-04 19:56:53 +02:00
sysinit.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
syslog.socket license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
system-systemd\x2dcryptsetup.slice man: document system-systemd\x2dcryptsetup.slice 2021-04-09 10:38:09 +02:00
system-update-cleanup.service license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
system-update-pre.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
system-update.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
systemd-ask-password-console.path unit: use alias name of man page 2021-06-15 12:14:26 +01:00
systemd-ask-password-console.service license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
systemd-ask-password-wall.path unit: use alias name of man page 2021-06-15 12:14:26 +01:00
systemd-ask-password-wall.service unit: use alias name of man page 2021-06-15 12:14:26 +01:00
systemd-backlight@.service.in meson: use jinja2 for unit templates 2021-05-19 10:24:43 +09:00
systemd-binfmt.service.in tree-wide: link to docs.kernel.org for kernel documentation 2022-07-04 19:56:53 +02:00
systemd-bless-boot.service.in meson: use jinja2 for unit templates 2021-05-19 10:24:43 +09:00
systemd-boot-check-no-failures.service.in meson: use jinja2 for unit templates 2021-05-19 10:24:43 +09:00
systemd-boot-system-token.service license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
systemd-boot-update.service boot: optionally update sd-boot on boot 2021-07-30 17:19:55 +02:00
systemd-coredump.socket systemd-coredump: Add conflict with shutdown.target 2021-04-29 21:45:23 +02:00
systemd-coredump@.service.in coredump: analyze object with libdwelf in forked process 2021-11-30 16:49:58 +00:00
systemd-exit.service license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
systemd-firstboot.service Revert "sysusers/firstboot: temporarily disable LoadCredential" 2021-05-03 12:16:35 +09:00
systemd-fsck-root.service.in fsck: no emergency.target on nofail mounts 2021-11-10 11:58:12 +01:00
systemd-fsck@.service.in meson: use jinja2 for unit templates 2021-05-19 10:24:43 +09:00
systemd-halt.service units: adjust Descriptions of various units 2021-06-30 13:25:16 +02:00
systemd-hibernate-resume@.service.in meson: use jinja2 for unit templates 2021-05-19 10:24:43 +09:00
systemd-hibernate.service.in unit: use alias name of man page 2021-06-15 12:14:26 +01:00
systemd-homed-activate.service license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
systemd-homed.service.in units: remove spurious empty line 2022-05-04 10:17:05 +02:00
systemd-hostnamed.service.in meson: use jinja2 for unit templates 2021-05-19 10:24:43 +09:00
systemd-hwdb-update.service.in meson: use jinja2 for unit templates 2021-05-19 10:24:43 +09:00
systemd-hybrid-sleep.service.in unit: use alias name of man page 2021-06-15 12:14:26 +01:00
systemd-importd.service.in units: make sure importd has CAP_LINUX_IMMUTABLE flag 2021-05-22 16:02:02 +09:00
systemd-initctl.service.in meson: use jinja2 for unit templates 2021-05-19 10:24:43 +09:00
systemd-initctl.socket unit: use alias name of man page 2021-06-15 12:14:26 +01:00
systemd-journal-catalog-update.service license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
systemd-journal-flush.service units: we need systemd-journald.service from systemd-journal-flush.service 2022-02-02 05:09:39 +09:00
systemd-journal-gatewayd.service.in meson: use jinja2 for unit templates 2021-05-19 10:24:43 +09:00
systemd-journal-gatewayd.socket license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
systemd-journal-remote.service.in meson: use jinja2 for unit templates 2021-05-19 10:24:43 +09:00
systemd-journal-remote.socket license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
systemd-journal-upload.service.in meson: use jinja2 for unit templates 2021-05-19 10:24:43 +09:00
systemd-journald-audit.socket license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
systemd-journald-dev-log.socket units: add IgnoreOnIsolate=yes to systemd-journald too 2022-07-01 14:17:33 +09:00
systemd-journald-varlink@.socket license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
systemd-journald.service.in units: add IgnoreOnIsolate=yes to systemd-journald too 2022-07-01 14:17:33 +09:00
systemd-journald.socket units: add IgnoreOnIsolate=yes to systemd-journald too 2022-07-01 14:17:33 +09:00
systemd-journald@.service.in journald: when journald namespace instances log, they can do so safely to the main journald instance 2021-06-09 12:30:22 +09:00
systemd-journald@.socket license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
systemd-kexec.service unit: use alias name of man page 2021-06-15 12:14:26 +01:00
systemd-localed.service.in units: generate ReadWritePaths= in the template 2021-05-19 10:25:26 +09:00
systemd-logind.service.in logind: add a comment with a reminder why we don't use ProtrectProc= 2021-12-17 21:34:20 +09:00
systemd-machine-id-commit.service license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
systemd-machined.service.in meson: use jinja2 for unit templates 2021-05-19 10:24:43 +09:00
systemd-modules-load.service.in meson: use jinja2 for unit templates 2021-05-19 10:24:43 +09:00
systemd-network-generator.service.in unit: run network-generator before starting udevd 2021-12-16 01:44:17 +09:00
systemd-networkd-wait-online.service.in meson: use jinja2 for unit templates 2021-05-19 10:24:43 +09:00
systemd-networkd-wait-online@.service.in unit: introduce wait-online@.service for specific interface 2022-01-28 12:52:52 +00:00
systemd-networkd.service.in units: enable systemd-network-generator by default 2021-12-16 09:49:39 +01:00
systemd-networkd.socket systemd-networkd.socket: Add conflict with shutdown.target (#19348) 2021-04-19 11:25:33 +09:00
systemd-nspawn@.service.in units: drop After=systemd-resolved.service from systemd-nspawn@.service 2022-02-24 10:37:11 +01:00
systemd-oomd.service.in oom: Add support for user unit ManagedOOM property updates 2021-09-20 13:53:11 +01:00
systemd-oomd.socket oom: Add support for user unit ManagedOOM property updates 2021-09-20 13:53:11 +01:00
systemd-portabled.service.in meson: use jinja2 for unit templates 2021-05-19 10:24:43 +09:00
systemd-poweroff.service units: adjust Descriptions of various units 2021-06-30 13:25:16 +02:00
systemd-pstore.service.in pstore: Run after modules are loaded 2022-06-14 10:17:20 +09:00
systemd-quotacheck.service.in meson: use jinja2 for unit templates 2021-05-19 10:24:43 +09:00
systemd-random-seed.service.in units: skip some units in the initrd 2021-05-22 15:58:40 +09:00
systemd-reboot.service units: adjust Descriptions of various units 2021-06-30 13:25:16 +02:00
systemd-remount-fs.service.in meson: use jinja2 for unit templates 2021-05-19 10:24:43 +09:00
systemd-repart.service.in meson: use jinja2 for unit templates 2021-05-19 10:24:43 +09:00
systemd-resolved.service.in units: move resolved to sysinit.target (from basic.target) 2022-02-24 10:36:47 +01:00
systemd-rfkill.service.in meson: use jinja2 for unit templates 2021-05-19 10:24:43 +09:00
systemd-rfkill.socket license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
systemd-suspend-then-hibernate.service.in unit: use alias name of man page 2021-06-15 12:14:26 +01:00
systemd-suspend.service.in units: adjust Descriptions of various units 2021-06-30 13:25:16 +02:00
systemd-sysctl.service.in meson: use jinja2 for unit templates 2021-05-19 10:24:43 +09:00
systemd-sysext.service sysext: rework command line interface to be verb-based 2021-01-20 17:50:23 +01:00
systemd-sysupdate-reboot.service.in unit: add units for new "systemd-sysupdate" tool 2022-03-19 00:13:55 +01:00
systemd-sysupdate-reboot.timer unit: add units for new "systemd-sysupdate" tool 2022-03-19 00:13:55 +01:00
systemd-sysupdate.service.in unit: add units for new "systemd-sysupdate" tool 2022-03-19 00:13:55 +01:00
systemd-sysupdate.timer spelling: weekday names are capitalized 2022-03-21 12:16:54 +01:00
systemd-sysusers.service Revert "sysusers/firstboot: temporarily disable LoadCredential" 2021-05-03 12:16:35 +09:00
systemd-time-wait-sync.service.in meson: use jinja2 for unit templates 2021-05-19 10:24:43 +09:00
systemd-timedated.service.in meson: use jinja2 for unit templates 2021-05-19 10:24:43 +09:00
systemd-timesyncd.service.in meson: use jinja2 for unit templates 2021-05-19 10:24:43 +09:00
systemd-tmpfiles-clean.service units: make sure systemd-tmpfiles-{setup,clean} don't survive switch-root 2021-08-06 11:11:14 +01:00
systemd-tmpfiles-clean.timer units: skip some units in the initrd 2021-05-22 15:58:40 +09:00
systemd-tmpfiles-setup-dev.service license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
systemd-tmpfiles-setup.service units: make sure systemd-tmpfiles-{setup,clean} don't survive switch-root 2021-08-06 11:11:14 +01:00
systemd-udev-settle.service license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
systemd-udev-trigger.service unit: prioritize module devices 2022-07-01 15:47:45 +02:00
systemd-udevd-control.socket unit: use alias name of man page 2021-06-15 12:14:26 +01:00
systemd-udevd-kernel.socket unit: use alias name of man page 2021-06-15 12:14:26 +01:00
systemd-udevd.service.in udev: run the main process, workers, and spawned commands in /udev subcgroup 2022-03-17 20:24:38 +09:00
systemd-update-done.service.in meson: use jinja2 for unit templates 2021-05-19 10:24:43 +09:00
systemd-update-utmp-runlevel.service.in units: adjust description of systemd-update-utmp.service 2021-06-30 13:25:16 +02:00
systemd-update-utmp.service.in units: adjust description of systemd-update-utmp.service 2021-06-30 13:25:16 +02:00
systemd-user-sessions.service.in meson: use jinja2 for unit templates 2021-05-19 10:24:43 +09:00
systemd-userdbd.service.in meson: use jinja2 for unit templates 2021-05-19 10:24:43 +09:00
systemd-userdbd.socket userdbd: also listen on a varlink socket io.systemd.DropIn 2021-05-10 14:58:39 +02:00
systemd-vconsole-setup.service.in meson: use jinja2 for unit templates 2021-05-19 10:24:43 +09:00
systemd-volatile-root.service.in meson: use jinja2 for unit templates 2021-05-19 10:24:43 +09:00
time-set.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
time-sync.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
timers.target units: adjust Descriptions of various units 2021-06-30 13:25:16 +02:00
tmp.mount unit: escape % 2022-02-23 06:54:54 +09:00
umount.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
usb-gadget.target license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
user-runtime-dir@.service.in logind: don't delay login for root even if systemd-user-sessions.service is not activated yet 2022-07-12 22:54:39 +01:00
user.slice license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
user@.service.in logind: don't delay login for root even if systemd-user-sessions.service is not activated yet 2022-07-12 22:54:39 +01:00
var-lib-machines.mount license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
veritysetup-pre.target dm-verity: Remove usage of integrity 2021-10-14 12:17:02 -05:00
veritysetup.target dm-verity: Remove usage of integrity 2021-10-14 12:17:02 -05:00