You are not logged in.
How can I allow any user to start or stop a service which needs root rights to be started or to be stopped using systemctl?
Offline
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Online
If you don't want all your users to get sudo access, perhaps you could also try https://wiki.archlinux.org/index.php/Polkit
I am not certain it would let you allow specific users to only enable a specific service, but it looks promising to me. Perhaps some sort of wrapper script.
Good luck.
Last edited by jinal (2015-12-03 09:46:05)
Offline
If you don't want all your users to get sudo access...
What does this mean? With sudo you configure which users should be allowed to run what commands.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Online
Trilby, sorry, my mistake.
Offline
you can use "visudo" to add that user to run only a specific command and not require password. Something like this
user1 ANY=(ANY) service
Offline
openrijal, that would still require a password. The instructions on how to do it properly are in the wiki or man page.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Online