systemd icon indicating copy to clipboard operation
systemd copied to clipboard

Better error message for "interactive authentication required"

Open kenaniah opened this issue 11 years ago • 7 comments

https://github.com/systemd/systemd/blob/564c44436cf64adc7a9eff8c17f386899194a893/src/shared/bus-util.c#L454 - the error message returned here is very ambiguous and unhelpful when it is bubbled up to userland. The error returned should be more descriptive, and should probably mention something about elevated privileges being required.

Example:

core@ip-10-0-10-70 ~ $ systemctl stop datadog
Failed to stop datadog.service: Interactive authentication required.

Instead of telling me anything that would help me remedy the issue, I'm left baffled as to why this command didn't run. Granted, all I need to do is re-run with sudo, but there should be some sort of indication that elevated privileges are required.

kenaniah avatar Dec 01 '15 20:12 kenaniah

This also had me puzzled until Google led me to this Github issue.

Atheros1 avatar Mar 16 '17 09:03 Atheros1

Also encountered when I tried to remotely shutdown a machine on my network:

smop@local:~$ systemctl --host remote poweroff
smop@local's password: 
Failed to set wall message, ignoring: Interactive authentication required.
Failed to power off system via logind: Interactive authentication required.
Failed to start poweroff.target: Interactive authentication required.
See system logs and 'systemctl status poweroff.target' for details.

smopucilowski avatar Mar 25 '17 11:03 smopucilowski

Yeah, I tried to restart remote services, but shit happened. Could you add 'sudo' option ? for running restart with sudo privileges if user has them?

alter avatar Nov 14 '17 08:11 alter

yes, it pulluzed me .

HehuaTang avatar Jan 29 '18 08:01 HehuaTang

We have not forgotten

brian15co avatar Jul 19 '18 09:07 brian15co

Agreed, it is needed

Seluj78 avatar Nov 22 '18 16:11 Seluj78

this error message is confusing.

sam2332 avatar May 06 '20 13:05 sam2332