On Tue, 2 Jan 2024, Rich Shepard wrote:

I've added my username to /etc/sudoers. I have a script that needs to run using sudo with a user rather than by root. When I run the script's commands in a console I enter my password when requested by sudo. How can I have the script provide the password? Or, do I modify /etc/sudoers to allow me to run these commands without a password?

The Linux distributions I use all have an /etc/cron.d directory that allows you to run scripts under any UID, no sudo required.

The modified crontab entries for snippets in that directory are documented in the crontab(5) man page, at least on my systems.

--
Paul Heinlein
heinl...@madboa.com
45°22'48" N, 122°35'36" W

Reply via email to