I have a service (kado-demo.service
) that a normal user (kado
) should be able to restart without entering any password.
I created /etc/sudoers.d/user_restart
and added
kado ALL=NOPASSWD: /bin/systemctl restart kado-demo.service
Permissions:
-r--r----- 1 root root 585 Mar 5 10:47 user_restart
As user k, I now should be able to execute the given command, but this happens:
/bin/systemctl restart kado-demo.service
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to restart 'kado-demo.service'.
Multiple identities can be used for authentication:
(...)
Which is the same result as before I added the file.
The /etc/sudoers
contains
#includedir /etc/sudoers.d
And I even get the same result when I add content of the user_restart
file directly to /etc/sudoers
.
I'm running out of ideas...