[systemd-devel] systemctl inaccessible when enabling DynamicUser=true

Nils Kattenbeck nilskemail at gmail.com
Thu Mar 28 18:54:31 UTC 2024


On Thu, Mar 28, 2024 at 3:08 PM Luca Boccassi <luca.boccassi at gmail.com> wrote:
>
> Works just fine here in Debian with 252:

Hm, weird. With logging enabled I get the following output:

$ sudo systemd-run -t --collect -p DynamicUser=true -E
SYSTEMD_LOG_LEVEL=debug systemctl --failed
Running as unit: run-u1497.service
Press ^] three times within 1s to disconnect TTY.
Cannot stat /proc/1/root: Permission denied
running_in_chroot(): Permission denied
Bus n/a: changing state UNSET → OPENING
sd-bus: starting bus by connecting to /run/dbus/system_bus_socket...
Bus n/a: changing state OPENING → AUTHENTICATING
Successfully forked off '(pager)' as PID 386098.
Skipping PR_SET_MM, as we don't have privileges.
sd_pid_get_owner_uid() failed, enabling pager secure mode: No data available
Pager executable is "less", options "FRSXMK", quit_on_interrupt: yes
Bus n/a: changing state AUTHENTICATING → HELLO
Bus n/a: changing state HELLO → CLOSING
Failed to list units: Transport endpoint is not connected
Bus n/a: changing state CLOSING → CLOSED
$ systemd 252 (252.22-1~deb12u1)
+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS
+OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD
+LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT +QRENCODE +TPM2
+BZIP2 +LZ4 +XZ +ZLIB +ZSTD -BPF_FRAMEWORK -XKBCOMMON +UTMP +SYSVINIT
default-hierarchy=unified

I can also can reproduce this on another machine running Ubuntu 22.04
LTS with the systemd 249 (249.11-0ubuntu3.12). On my laptop (Fedora
40) I cannot reproduce the error and it works like in your case. The
other two machines are servers.


More information about the systemd-devel mailing list