RE: crontab and cron

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

 



Root cron script perms set correctly I believe... I will double check
tonight though when I get home to access this server

I attempted using crontab -e command. Using this method is what generates
the mail to root with the error indicated in previous message.
I also attempted placing the task in the cron.d and cron.hourly directories
using the following commands (each command was tried seperately). 
*/15 * * * * /etc/httpd/conf/nmbd.chk
*/15 0 * * * /etc/httpd/conf/nmbd.chk
This way, it does not even appear that cron is attempting to run the script
at all. Was my syntax correct in the above command mentioned command
structure?
I have check to ensure that the cron daemon actually is running correctly
and it appears to be.

The nmbd.chk script reads the httpd access_log for the string <winnt> and
yanks the ip address from that line and then adds the string "ALL: <IP
Address>" to the hosts.deny file. The script is owned by root and
executable. Perms are 775 on this script.

No permission denied messages are showing for any files associated with this
job


John P. Harper   CCNA / MCP
Security Administrator
EDS Department of Education Account
MS SKY 2 / 1200
5203 Leesburg Pike
Falls Church, Va 22041

* phone: +01-703-824-9516
* mailto:john.harper@eds.com
pager: 866-598-6661
www.eds.com



-----Original Message-----
From: Don Smith [mailto:mtchunt@bellsouth.net]
Sent: Wednesday, December 04, 2002 11:11 AM
To: security-discuss@linuxsecurity.com
Subject: Re: crontab and cron


DO you have your "root" cron script set with appropriate permissions?  It is
actually easier to just add tasks in the regular cron scripts and you can
set the intervals much easier.

You might also want to look at "logwatch". It lets you set up for monitoring
of logs very easily.

Don Smith

----- Original Message -----
From: "Harper, John P" <john.harper@eds.com>
To: <security-discuss@linuxsecurity.com>
Sent: Wednesday, December 04, 2002 8:21 AM
Subject: crontab and cron


> I have a small problem setting up cron jobs for root on a RedHat Linux
> Server.
> Does anyone know where cron gets its X-Cron-Env: <variable> from?
>
> When cron executes the script, the following gets mailed to root on the
> server.
> ***********************************************************************
> m: root@localhost.localdomain (Cron Daemon)
> To: root@localhost.localdomain
> Subject: Cron <root@localhost> root /etc/httpd/conf/nmbd.chk
> X-Cron-Env: <SHELL=/bin/sh>
> X-Cron-Env: <HOME=/root>
> X-Cron-Env: <PATH=/usr/bin:/bin>
> X-Cron-Env: <LOGNAME=root>
>
> /bin/sh: root: command not found
> ************************************************************************
> No error messages appear in system logs.
> The script contains #!/bin/bash as the first line.
> sh is a link to the bash shell in the /bin directory.
>
> I have done an extensive search on Red Hat's site for any information on
> this topic and come up dry.
> The man pages do not shed much light in to this either.
> I have never run across this before when setting up a cron or crontab job
> request.
>
> Sincerely,
>
> John P. Harper   CCNA / MCP
> Security Administrator
> EDS Department of Education Account
> ------------------------------------------------------------------------
>      To unsubscribe email security-discuss-request@linuxsecurity.com
>          with "unsubscribe" in the subject of the message.
>
>

------------------------------------------------------------------------
     To unsubscribe email security-discuss-request@linuxsecurity.com
         with "unsubscribe" in the subject of the message.
------------------------------------------------------------------------
     To unsubscribe email security-discuss-request@linuxsecurity.com
         with "unsubscribe" in the subject of the message.


[Index of Archives]     [Fedora Announce]     [Linux Crypto]     [Kernel]     [Netfilter]     [Bugtraq]     [USB]     [Fedora Security]

  Powered by Linux