[systemd-devel] systemctl without dbus

Nils Kattenbeck nilskemail at gmail.com
Thu Jan 9 18:47:26 UTC 2025


Hi, https://github.com/systemd/systemd/issues/14190 might also be off
interest for you

On Thu, Jan 9, 2025, 18:15 Mantas Mikulėnas <grawity at gmail.com> wrote:

> On Thu, Jan 9, 2025 at 4:46 PM Umut Tezduyar Lindskog <
> Umut.Tezduyar at axis.com> wrote:
>
>> Hi,
>>
>>
>>
>> I build a minimum image with mkosi with just systemd, udev as the
>> packages and set the default target to basic.target. It works fine but I
>> cannot shut down the system with systemctl. It complains that dbus is not
>> available.
>>
>>
>>
>> AFAIK, systemd implements it’s own dbus server to serve systemctl until
>> the dbus daemon / broker starts up. Is this a regression or has something
>> changed about the logic?
>>
>
> It uses a peer-to-peer dbus socket – i.e. not so much a 'dbus server' but
> a direct unix socket that happens to speak the dbus protocol. This is
> placed at /run/systemd/private and is restricted to root only (it doesn't
> support polkit-based authorization). Systemctl's
> bus_connect_transport_systemd() won't even try connecting to it when
> running as a different user than root.
>
> --
> Mantas Mikulėnas
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20250109/f5487efa/attachment.htm>


More information about the systemd-devel mailing list