On Tue, 14 Feb 2023 23:45:29 +0100, "Thomas L." wrote:

> what is the reason that /usr/local/{,s}bin is not in PATH in crontab?
> this seems to be the case on all unix-like systems and it regularly
> bites people. sometimes someone says it's for security w/o being
> able to tell what is being prevented by this. or is it just some
> historic default noone bothered to change?

On OpenBSD, the path setting in the /etc/login.conf file determines
what the default PATH will be used for commands run via cron.  By
default this is:

PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbi
n

If you have PATH set in the crontab file that will override the
default.

 - todd

Reply via email to