I’ve given my user root permission to run systemcl via visudo.
# visudo XXXXXX ALL=NOPASSWD: /bin/systemctl restart shiny-server.service
After logging out and back in, I run the command:
$ /bin/systemctl restart shiny-server.service
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units === Authentication is required to restart 'shiny-server.service'. Authenticating as: XXXXXXX Password:
I’m seeing things on line talking about
polkit but I’m not sure if that also needs to be configured along with
visudo. What’s required here to prevent a password from being required to run the command as a specified user?
You set up
sudo to allow you to run a command without a password, but you didn’t actually run the command with
To fix the problem, run the command with
sudo /bin/systemctl restart shiny-server.service
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.