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

SOLVED: /bin/sh: line 1: root: command not found



Christopher L. Everett wrote:

People,

I keep getting these emails, from multiple servers relating to entries in
/etc/crontab.  AFAIK, I'm doing everything right (maybe not the best way
technically, but following what the documentation says):

 -- using crontab -e
 -- looks the same to me as a working crontab on another server
 -- crontab package versions the same as a working crontab
 -- checked `man -e5 crontab` to see I had the correct format

I've googled for about 3 hours, and nothing that looks like an answer,
despite the fact that the problem happens often enough to deserve a FAQ.

I did find where for some reason, vi stuck a 2 byte UTF-8 character in
for the tab key (why? why? why?), but replacing it with a space did not
help, the only difference now is that the wide character doesn't show
on the subject line in my Mozilla mailbox.  In fact I replaced all the
tabs in /etc/crontab with space to no effect.

I'm all out of clue and this has my production servers snarled up.  Any
ideas here?

I figured it out: I believe another sysadmin ran `crontab /etc/crontab`,
which hosed everything up.  I found the answer on a BSD FAQ page of all
places.

Making a copy of /etc/crontab, running `crontab -r` to remove all the cronjobs, and restoring the /etc/crontab file did the trick. The info
and man pages for cron & crontab do not tell you not to use `crontab
/etc/crontab`, though they don't tell you to do it either.

--
Christopher L. Everett

Chief Technology Officer                               www.medbanner.com
MedBanner, Inc.                                          www.physemp.com




Reply to: