Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
2 correcting path to runuser
source | link

cron runs with a specific PATH, as seen in the upstream Debian source code:

#ifndef _PATH_DEFPATH
# define _PATH_DEFPATH "/usr/bin:/bin"
#endif

Referenced here:

#if defined(POSIX)
    setenv("PATH", _PATH_DEFPATH, 1);
#endif

and since runuser lives in /usr/sbin, you'll need to use the full path to it, or set PATH in your script to include /usr/sbin.

cron runs with a specific PATH, as seen in the upstream Debian source code:

#ifndef _PATH_DEFPATH
# define _PATH_DEFPATH "/usr/bin:/bin"
#endif

Referenced here:

#if defined(POSIX)
    setenv("PATH", _PATH_DEFPATH, 1);
#endif

and since runuser lives in /usr/sbin, you'll need to use the full path to it, or set PATH in your script to include /usr/sbin.

cron runs with a specific PATH, as seen in the upstream Debian source code:

#ifndef _PATH_DEFPATH
# define _PATH_DEFPATH "/usr/bin:/bin"
#endif

Referenced here:

#if defined(POSIX)
    setenv("PATH", _PATH_DEFPATH, 1);
#endif

and since runuser lives in /sbin, you'll need to use the full path to it, or set PATH in your script to include /sbin.

1
source | link

cron runs with a specific PATH, as seen in the upstream Debian source code:

#ifndef _PATH_DEFPATH
# define _PATH_DEFPATH "/usr/bin:/bin"
#endif

Referenced here:

#if defined(POSIX)
    setenv("PATH", _PATH_DEFPATH, 1);
#endif

and since runuser lives in /usr/sbin, you'll need to use the full path to it, or set PATH in your script to include /usr/sbin.