Search code examples
linuxubuntuservicecron

How to make service not require superuser password entry?


I am doing the command service cron start in the shell which requires a superuser password entry. I am the root user on this (OracleVB running Ubuntu).

Is there a way to add this command to an approved user task where I can just type service cron start and not be prompted for a password?


Solution

  • Starting and stopping system services should only be possible for the root user.

    You might want to enable your service to start at boot with systemctl enable --now yourservice instead.

    You can always use systemctl status yourservice to check if it is currently running.