[luau] sudo and cron
    Vince Hoang 
    luau at ml.altern8.net
       
    Wed Nov 19 05:32:01 PST 2003
    
    
  
On Wed, Nov 19, 2003 at 02:49:05AM -1000, Randall Oshita wrote:
> Actually, i dont think you can use PATH as a vaible in a crontab. I tried anyways and did not work.
> i also tried this in my crontab
> 30 1 * * * * /usr/local/sudo "/export/home/x/restart_script"
> which dont work either. 
> ideas?
First, you _can_ set the PATH in a crontab on vixie influenced
versions of cron. I regularly have MAILTO, PATH, and SHELL set.
Second, if the sudo binary is actually at /usr/local/sudo instead
of .../sbin, someone really screwed up installing sudo.
Third, why are you even trying to use sudo? If you need to run
the script as root, add it to root's crontab. Unless you editted
sudoers to not prompt for passwords, the entry will get stuck
waiting for cron to enter in a password.
-Vince
    
    
More information about the LUAU
mailing list