1

I'm starting a process with the cap_kill capability and use this process to kill other services. However I'd like to be able to restart these service with a systemctl restart xxx

Is there a capability to allow this without having to run it with sudo?

Jeff Schaller
  • 66,199
  • 35
  • 114
  • 250
Quentin
  • 203
  • 3
  • 10

1 Answers1

1

To allow a non-root user to restart a system service, you can either use sudo (which you say you want to avoid), or PolKit.

Please refer to this answer for instructions on how to configure PolKit rules.

asymmetric
  • 111
  • 3