1 |
Am 26.03.2015 um 01:46 schrieb microcai: |
2 |
> on Saturday 21 March 2015 13:58:45,Canek Peláez Valdés wrote: |
3 |
>> On Sat, Mar 21, 2015 at 1:47 PM, Rich Freeman <rich0@g.o> wrote: |
4 |
>>> On Sat, Mar 21, 2015 at 3:39 PM, German <gentgerman@×××××.com> wrote: |
5 |
>>>> No, I am trying to shutdown from a console |
6 |
>>> Well, the old answer would be that you need to use sudo to run it, as |
7 |
>>> shutting down is a privileged operation. |
8 |
>>> |
9 |
>>> I suspect that the new answer is that with appropriate |
10 |
>>> policykit/consolekit/etc settings you can probably allow somebody |
11 |
>>> sitting at a physical console to shut down the system, or any |
12 |
>>> logged-in user if you prefer. However, I haven't actually set that up |
13 |
>>> myself. |
14 |
>> logind does that for you automagically™. The first seat has the rights to |
15 |
>> poweroff or reboot the machine, and it can differentiate between local and |
16 |
>> remote logins. You can check if your user session has the permissions to |
17 |
>> poweroff/reboot via dbus: |
18 |
>> |
19 |
>> $ gdbus call --system --dest org.freedesktop.login1 --object-path |
20 |
>> /org/freedesktop/login1 --method org.freedesktop.login1.Manager.CanPowerOff |
21 |
>> ('yes',) |
22 |
>> |
23 |
>> $ gdbus call --system --dest org.freedesktop.login1 --object-path |
24 |
>> /org/freedesktop/login1 --method org.freedesktop.login1.Manager.CanReboot |
25 |
>> ('yes',) |
26 |
>> |
27 |
>> But you need systemd to use logind1. There has been some attempts to |
28 |
>> reimplement logind outside systemd, but I'm not sure how advanced they are. |
29 |
>> |
30 |
>> This kind of problems were one of the reasons for creating logind. |
31 |
>> |
32 |
> and dump people keep talking nonsencely that sysvinit is enough while it |
33 |
> cannot even handle reboot for normal user. sad. |
34 |
> |
35 |
> |
36 |
> |
37 |
|
38 |
it can. Did for decaded. |
39 |
|
40 |
Dumb systemd fanbois spouting their lies everywhere. Sad. |