[systemd-devel] systemctl reboot/halt with non-privilege user

An Liu sourceonly at gmail.com
Wed Oct 28 12:34:55 UTC 2020


[user at host ~]$ systemctl poweroff
>>
>> ==== AUTHENTICATING FOR org.freedesktop.login1.set-wall-message ====
>>
>> Authentication is required to set a wall message
>>
>> Authenticating as: root
>>
>> Password
>>
>
UPDATED:
some of folks just kindly remind me that polkit configuration will be the
key,
I've some quick tests over it

| command                       |    response                   |
|systemctl reboot  locally | reboot without prompt |
|systemctl halt  locally      |  halt with prompt          |
|systemctl reboot  via ssh |  reboot with prompt     |


so the case should not be worse than i think, at least you can't do it
remotely.
might consider it a small flaw when you use it as PC rather as server.
also thank you for sharing such good resources :)





-- 
Liu An
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20201028/879f61e3/attachment-0001.htm>


More information about the systemd-devel mailing list