[systemd-devel] Run reboot as normal user

Mantas Mikulėnas grawity at gmail.com
Tue Nov 30 08:42:52 UTC 2021


On Tue, Nov 30, 2021 at 10:11 AM Mohamed Ali Fodha <
fodha.mohamed.ali at gmail.com> wrote:

> Hello,
>
> I want to run reboot as normal user using the following command:
> dbus-send --system --print-reply --reply-timeout=2000 --type=method_call
> --dest=org.freedesktop.login1 /org/freedesktop/login1
> org.freedesktop.login1.Manager.Reboot boolean:false
>
> but I got a Permission denied error.
>
> I checked that verify_shutdown_creds (in logind-dbus.c) calls
> bus_verify_polkit_async, could it be the reason why I got permission denied
> error while polkit is not installed?
>

Yes. Polkit is the authorization system that decides whether to allow
normal users to do privileged actions or not.


> I don't want to use Polkit or sudo, is there any solution ?
>

No.

-- 
Mantas Mikulėnas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20211130/e4e4873e/attachment.htm>


More information about the systemd-devel mailing list