On Thu, 27 Jan 2022 20:16:12 +0100 "Carlos E. R." <robin.listas@telefonica.net> wrote:
On 27/01/2022 19.50, joea- lists wrote:
On 27/01/2022 19.31, joea- lists wrote:
I find myself a bit brain fogged trying to setup an application to run as a system user rather than as the logged user.
Done a bit of searching but only come up with very dated stuff that refers to now non existent settings.
Pointers to a suse specific "how to" might be sufficient for a kick start.
"man sudo"
I'll give it a look. I may have not correctly stated what I want to do.
You get better answers the better you explain what you want to do ;-)
Don't want to execute from a command prompt, but have it start as part of boot, as via systemd. I have it working that way but it runs a regular user, not as the "system" user it is suggested it be run as.
For some reason, age, sanity, etc,, it just escapes me how to do that.
Well, for example, a task defined in "/etc/cron.d/" does that:
*/20 * * * * cer /usr/local/bin/whatever
Is a job that runs every 20 minutes as user "cer".
man cron, man crond, man crontab...
One of the keywords for cron is running at boot.
That's one of the traditional methods. With systemd, it is done differently, but I am not an expert. Depends exactly on what you are trying to do.
I find setting up the cron job with an @reboot time is helpful fo running one-time jobs, especially when the job itself starts with something like sleep 60 && ...whatever... to make sure the system is fully up and stable first