I would prefer if it even does not aks who i am. It should ask for password only. And my second wish is, that i would be able to poweroff even without password as I do in GUI/Gnome.

Regards
Pavel


Michael Biebl napsal(a) dne 11.7.2016 v 14:39:
Am 11.07.2016 um 14:33 schrieb Pavel Kosina:
Its ssh, putty,

dady@linuxbox:~$ systemctl poweroff
==== AUTHENTICATING FOR org.freedesktop.login1.set-wall-message ===
Authentication is required to set a wall message
Multiple identities can be used for authentication:
 1.  ,,, (dady)
 2.  ,,, (danca)
Choose identity to authenticate as (1-2): 1
Password:
==== AUTHENTICATION COMPLETE ===
==== AUTHENTICATING FOR org.freedesktop.login1.power-off ===
Authentication is required for powering off the system.
Multiple identities can be used for authentication:
 1.  ,,, (dady)
 2.  ,,, (danca)
Choose identity to authenticate as (1-2): Failed to power off system via
logind: Spojení bylo přílií
Failed to start poweroff.target: Spojení bylo příliš dlouho neaktivní
See system logs and 'systemctl status poweroff.target' for details.
dady@linuxbox:~$
dady@linuxbox:~$ loginctl show-session $XDG_SESSION_ID
Id=5
User=1000
Name=dady
Timestamp=Po 2016-07-11 14:30:44 CEST
TimestampMonotonic=1861158573
VTNr=0
Remote=yes
RemoteHost=192.168.1.101
Service=sshd
Thanks for the quick reply. So this is a remote login. That explains why
you get the polkit prompt.
As you can see, the admin password is asked for two distinct things:
For setting a wall message and for the actual poweroff.
Both require admin privileges.
If you don't want to have the prompt for the wall message, use
systemctl poweroff --no-wall
That should only give you one polkit prompt.

Afaics, everything is working as expected, although I have to admit that
entering the credentials twice for the same command is a nuisance.

Regards,
Michael




Reply via email to