On Sat, 2004-09-25 at 01:57, Robert Slade wrote: > Hiya, > > I am getting an error for Cron: > > /bin/bash: line 1: root: command not found > > My Crontab looks like this: > Is this your system crontab (/etc/crontab) or the crontab for root? > SHELL=/bin/bash > PATH=/sbin:/bin:/usr/sbin:/usr/bin > MAILTO=root > HOME=/ > > # run-parts > 01 * * * * root run-parts /etc/cron.hourly > 02 4 * * * root run-parts /etc/cron.daily > 22 4 * * 0 root run-parts /etc/cron.weekly > 42 4 1 * * root run-parts /etc/cron.monthly > # run-tasks > 0 2 * * * /usr/bin/freshclam --quiet -l /var/log/clam-update.log > 0 3 * * * /var/qmail/bin/qmailstats 1>/dev/null 2>/dev/null > > It looks like the problem is with SHELL=/bin/bash, but the file is > there. > If this is the system crontab, AFAIK the line *requires* the user field for execution. Your entries above for freshclam and qmail do not have the 6th field properly filled in for use in /etc/crontab. > Sorry if this is bit basic, but I'm stuck. > The bash complaint is that the shell cannot run the requested program (root). This error implies you are trying to use /etc/crontab as your users crontab. It is taking only part of the data as the command to execute. The system crontab uses 7 fields, and the user crontab uses 6 fields. I believe this is coppied from the system crontab since the first 4 lines with times use 7 fields and the last ones (obviously manually added) only have 6 fields. My system crontab is: ___________________________ [jeff@goliath jeff]$ cat /etc/crontab SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/ # run-parts 01 * * * * root run-parts /etc/cron.hourly 02 4 * * * root run-parts /etc/cron.daily 22 4 * * 0 root run-parts /etc/cron.weekly 42 4 1 * * root run-parts /etc/cron.monthly ______________________________ and my root crontab is: _________________________ 27 0-23/4 * * * /root/bin/seti.restart __________________________ In both cases, the first 5 fields are the times for execution. However the system crontab uses field 6 to specify the user, and the rest (field 7) is the command. The users crontab only has 6 fields, and field 6 is the command. > Rob >