LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 04-15-2006, 06:08 PM   #1
gabsik
Member
 
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 546

Rep: Reputation: 30
A mail from cron ...


i keep on getting this mail sent by logcheck about cron:
Cron <root@argo> root run-parts --report /etc/cron.hourly
/bin/sh: line 1: root: command not found

I don' t really understand wherere that line from /bin/sh might be!/etc/cron.hourly it's a directory

argo:~# ls /etc/cron.daily/
5snort exim4-base logrotate modutils standard
bsdmainutils find man-db netkit-inetd sysklogd
chkrootkit fwlogwatch mixmaster .placeholder welcome2l

The mail i receive it's as like i wrote above that's it .. it does not says much who belongs that /bin/sh :line1 root: command not found!

 
Old 04-16-2006, 01:10 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
the line will be in /etc/cron, i'd guess you accidentally got a typo in there. show us the file and we'll see.
 
Old 04-17-2006, 03:34 AM   #3
gabsik
Member
 
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 546

Original Poster
Rep: Reputation: 30
That's right /etc/crontab has this line :
17 * * * * root run-parts --report /etc/cron.hourly

and this is the message in the mail i get:

Subject: Cron <root@argo> root run-parts --report /etc/cron.hourly
/bin/sh: line 1: root: command not found

It's an automatically generated cronjob the rest of the crontab is:

25 6 * * * root test -x /usr/sbin/anacron || run-parts --report /etc/cron.daily
47 6 * * 7 root test -x /usr/sbin/anacron || run-parts --report /etc/cron.weekly
52 6 1 * * root test -x /usr/sbin/anacron || run-parts --report /etc/cron.monthly

What's anacron ??I will comment the first line but what was that line for ?What's the correct one?
Grazie!
 
Old 04-17-2006, 03:41 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
anacron is an alternative to standard cron which will run jobs missed if th ebox was shutdown when the jobs were meant to run etc... normally they are kept wholly seperate, not normally in the same crontab.

the format of /etc/crontab is different to the user crontabs, edited via crontab -e in that it has that extra username column to specify what user each command runs as, as there is no user concept there. so it sounds like a system crontab entry has been put into a user crontab file, so that column is being used as the command, as it's not valid outside of /etc/crontab.
 
  


Reply

Tags
binsh, command, cron, found, keep, line, mail, report, root


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cron mail sending using outside SMTP mail server Utah Linux - Software 6 08-24-2005 07:44 PM
No More Cron Mail, Cron Error? Xhost Linux - General 3 07-26-2004 04:28 PM
need only cron job mail on my mail id manojthakkar Linux - Newbie 0 12-20-2003 05:41 AM
cron mail help joesbox Linux - General 1 03-30-2003 10:20 PM
Cron: E-Mail me only when necessary elconde Linux - General 3 05-31-2002 09:40 AM


All times are GMT -5. The time now is 01:45 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration