  | | | Cron reporting root command not found | Cron reporting root command not found 2007-06-20 - By David.Knight@(protected)
Back What crontab is it in? if you do a crontab -l is it there? or is it in the /etc/crontab?
Cron.daily will want a user to run the command, I.E: 01 * * * * root run-parts /etc/cron.hourly
Above root is the user to run the command, run-parts is the command and /etc/cron.hourly is the option to the run-parts command. However if you used crontab -e to edit the crontab, the crontab file will be in /var/spool/cron/ (Unix style)... This crontab does not want the user. it uses a user before the command. It manages a crontab per user... I.E.: [root@(protected) cron]# pwd /var/spool/cron [root@(protected) cron]# ls -l total 8 -rw-- ---- 1 root root 54 Aug 29 2006 root [root@(protected) cron]# cat root 00 5 * * * /root/dr/dr.backup.ksh
Hope this helps, David Knight
d.qureshi@(protected) Sent by: taroon-list-bounces@(protected) 06/20/2007 09:12 AM Please respond to "Discussion of Red Hat Enterprise Linux 3 (Taroon)" <taroon-list@(protected)>
To TAROON-LIST@(protected) cc
Subject Cron reporting root command not found
I keep on getting this mail sent by logcheck about cron
From: (Cron Daemon) To: root Subject: Cron <root@> root /usr/lib/sa/sa1 1 1 X-Cron-Env: <SHELL=/bin/sh> X-Cron-Env: <HOME=/root> X-Cron-Env: <PATH=/usr/bin:/bin> X-Cron-Env: <LOGNAME=root> Status: O
/bin/sh: line 1: root: command not found
I don' t really understand why cron is mailing this to root?
Can anyone help me why cron is complaining to root about line 1 and how do I correct?
-- Taroon-list mailing list Taroon-list@(protected) https://www.redhat.com/mailman/listinfo/taroon-list
<br><font size=2 face="sans-serif">What crontab is it in? if you do a crontab -l is it there? or is it in the /etc/crontab?</font> <br> <br><font size=2 face="sans-serif">Cron.daily will want a user to run the command, I.E:</font> <br><font size=2 face="sans-serif">01 * * * * root run-parts /etc/cron.hourly< /font> <br> <br><font size=2 face="sans-serif">Above root is the user to run the command, run-parts is the command and /etc/cron.hourly is the option to the run-parts command.</font> <br><font size=2 face="sans-serif">However if you used crontab -e to edit the crontab, the crontab file will be in /var/spool/cron/ (Unix style)... This crontab does not want the user. it uses a user before the command. It manages a crontab per user... I.E.:</font> <br><font size=2 face="sans-serif">[root@(protected) cron]# pwd</font> <br><font size=2 face="sans-serif">/var/spool/cron</font> <br><font size=2 face="sans-serif">[root@(protected) cron]# ls -l</font> <br><font size=2 face="sans-serif">total 8</font> <br><font size=2 face="sans-serif">-rw-- ---- 1 root root 54 Aug 29 2006 root</font> <br><font size=2 face="sans-serif">[root@(protected) cron]# cat root</font> <br><font size=2 face="sans-serif">00 5 * * * /root/dr/dr.backup.ksh</font> <br> <br><font size=2 face="sans-serif">Hope this helps,</font> <br><font size=2 face="sans-serif">David Knight</font> <br> <br> <br> <br> <br> <br> <table width=100%> <tr valign=top> <td width=40%><font size=1 face="sans-serif"><b>d.qureshi@(protected)</b> </font> <br><font size=1 face="sans-serif">Sent by: taroon-list-bounces@(protected)< /font> <p><font size=1 face="sans-serif">06/20/2007 09:12 AM</font> <table border> <tr valign=top> <td bgcolor=white> <div align=center><font size=1 face="sans-serif">Please respond to<br> "Discussion of Red Hat Enterprise Linux 3 (Taroon)" <taroon-list @(protected)></font></div></table> <br> <td width=59%> <table width=100%> <tr valign=top> <td> <div align=right><font size=1 face="sans-serif">To</font></div> <td><font size=1 face="sans-serif">TAROON-LIST@(protected)</font> <tr valign=top> <td> <div align=right><font size=1 face="sans-serif">cc</font></div> <td> <tr valign=top> <td> <div align=right><font size=1 face="sans-serif">Subject</font></div> <td><font size=1 face="sans-serif">Cron reporting root command not found</font> </table> <br> <table> <tr valign=top> <td> <td></table> <br></table> <br> <br> <br><font size=2><tt>I keep on getting this mail sent by logcheck about cron<br> <br> From: (Cron Daemon)<br> To: root<br> Subject: Cron <root@> root /usr/lib/sa/sa1 1 1<br> X-Cron-Env: <SHELL=/bin/sh><br> X-Cron-Env: <HOME=/root><br> X-Cron-Env: <PATH=/usr/bin:/bin><br> X-Cron-Env: <LOGNAME=root><br> Status: O<br> <br> /bin/sh: line 1: root: command not found<br> <br> I don' t really understand why cron is mailing this to root?<br> <br> Can anyone help me why cron is complaining to root about line 1 and how<br> do I correct?<br> <br> <br> <br> <br> <br> --<br> Taroon-list mailing list<br> Taroon-list@(protected)<br> https://www.redhat.com/mailman/listinfo/taroon-list<br> </tt></font> <br> -- Taroon-list mailing list Taroon-list@(protected) https://www.redhat.com/mailman/listinfo/taroon-list
|
|
 |