[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Cron 101: Cron message "/bin/sh: root: command not found"



On 11/05/2014 10:48, Martin Steigerwald wrote:

Look into

- /etc/cron.d
- crontab -l

It would not make much sense, but maybe someone added a call to
/etc/cron.hourly there.


server4:/# crontab -l
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user  command
17 *    * * *   root    cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) 47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ) 52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
#
# 24 10 * * * ron rdiff-backup --print-statistics -v3 /nfs ron@server5::/sata1tb/backup/filestorebak # 24 13 * * * ron rdiff-backup --print-statistics -v3 /nfs ron@server5::/sata1tb/backup/filestorebak # 24 16 * * * ron rdiff-backup --print-statistics -v3 /nfs ron@server5::/sata1tb/backup/filestorebak # 24 19 * * * ron rdiff-backup --print-statistics -v3 /nfs ron@server5::/sata1tb/backup/filestorebak
#
#

How very odd.
That isn't the content of /etc/crontab .
That's the content of a much earlier cron arrangement we had before we reconfigured some of the servers, a couple of years ago. It also does not contain our existing nfs backup cronjob (which regularly runs happily and sends a confirming email). So this output of crontab -l is *not* /etc/crontab. *Neither* is it reporting all the current cron jobs that run.

/etc/cron.d only contains anacron and mdadm; the anacron entry is for 07:30 every day (so not causing our hourly problem) and mdadm is a monthly check.

Grateful for the tip, Martin.

EDIT: I see from Andrei's and Filip's replies that this report may be picking up root's crontab from /var/spool/cron/crontabs .

Ron


Reply to: