my terminal
Im tring to make a spetial rule for the user to be able to restart a service,whitout needing to input a password , i whant a script to do that , the rule is there and yet it seams to be ignored.
sudo /usr/bin/systemctl restart easyimo
[sudo] password for raspova:
sudo: a password is required
➜ ~ sudo -lU raspova
Matching Defaults entries for raspova on ip-172-31-89-199:
env_reset, mail_badpass, secure_path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin, use_pty
User raspova may run the following commands on ip-172-31-89-199:
(ALL) NOPASSWD: /usr/bin/systemctl restart easyimo
(ALL : ALL) ALL
➜ ~ id
uid=1001(raspova) gid=1001(raspova) groups=1001(raspova),27(sudo)
➜ ~ /usr/bin/systemctl restart easyimo
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to restart 'easyimo.service'.
Multiple identities can be used for authentication:
1. Ubuntu (ubuntu)
2. Jo,,, (raspova)
Choose identity to authenticate as (1-2): 2
Password:
polkit-agent-helper-1: pam_authenticate failed: Authentication failure
==== AUTHENTICATION FAILED ===
Failed to restart easyimo.service: Access denied
See system logs and 'systemctl status easyimo.service' for details.
New contributor
Jona Jo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.