| Summary: | sys-process/cronie-1.4.9-r5 ships a non-working crontab | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Michelangelo Scopelliti <kernelpanic> |
| Component: | [OLD] Core system | Assignee: | Lars Wendler (Polynomial-C) (RETIRED) <polynomial-c> |
| Status: | RESOLVED INVALID | ||
| Severity: | normal | ||
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
|
Description
Michelangelo Scopelliti
2013-02-04 17:57:18 UTC
Paradoxically the /etc/crontab file is exactly working for me like this: */2 * * * * nonrootuser echo "$(date)" >> /home/nonrootuser/crontestfile results in the date/time being written into the given file every two minutes as the specified user. So I rather suppose that the man page is missing the special treatment of the syscrontab (/etc/crontab) file. Please check if you really need to remove the user from the file to make it working. with the 'root' field in /etc/crontab, my 'dead.letter' showed a periodic "root: command not found". Besides that, in cron.log I had Jan 28 10:40:01 qlipah CROND[12357]: (root) CMD (root^Itest -x /usr/sbin/run-cro ns && /usr/sbin/run-crons ) over and over. Moreover, no periodic operations (e.g. log rotations) were made. The problem disappeared after removing the 6th field for /etc/crontab. I still cannot reproduce your problem. Even as user root the command from my previous post works flawlessly here. Please attach the broken crontab file to this bug. ok, some additional info: I've just re-emerged cronie: results of emerge -pqv cronie: [ebuild R ] sys-process/cronie-1.4.9-r5 USE="inotify pam -anacron (-selinux)" the crontab is the default one, /usr/portage/sys-process/cronie/files/cronie-1.2-crontab after the install, as root: # crontab /etc/crontab # /etc/init.d/cronie restart so, the stock one, no modification at all. After some time, # cat /root/dead.letter /bin/bash: root: command not found (tho empty lines, then the message). relevant lines in /var/log/cron.log: Feb 5 10:08:01 qlipah crond[1705]: (*system*) RELOAD (/etc/crontab) Feb 5 10:08:01 qlipah crond[1705]: (cron.update) ORPHAN (no passwd entry) Feb 5 10:08:52 qlipah crontab[17949]: (root) REPLACE (root) Feb 5 10:09:00 qlipah crond[18148]: (CRON) STARTUP (1.4.9) Feb 5 10:09:00 qlipah crond[18148]: (cron.update) ORPHAN (no passwd entry) Feb 5 10:09:00 qlipah crond[18148]: (CRON) INFO (running with inotify support) Feb 5 10:09:00 qlipah crond[18148]: (CRON) INFO (@reboot jobs will be run at computer's startup.) Feb 5 10:10:01 qlipah CROND[18178]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons ) Feb 5 10:10:01 qlipah CROND[18179]: (root) CMD (root^Itest -x /usr/sbin/run-crons && /usr/sbin/run-crons ) Feb 5 10:10:01 qlipah CROND[18176]: (root) MAIL (mailed 35 bytes of output but got status 0x0001 ...and that's my situation at the moment. Again, nothing of this happens if I edit the crontab. Do you need something else? btw, thank you for your help. (In reply to comment #4) > > Feb 5 10:10:01 qlipah CROND[18178]: (root) CMD (test -x /usr/sbin/run-crons > && /usr/sbin/run-crons ) > Feb 5 10:10:01 qlipah CROND[18179]: (root) CMD (root^Itest -x > /usr/sbin/run-crons && /usr/sbin/run-crons ) > And that's what confuses me. According to these two lines, the command will first be executed successfully (without the "root" being prepended) and then something is prepending the command with "root" which fails. Did you check that there's no other crontab which might contain that command? ("crontab -l" as root for example) > > btw, thank you for your help. You're welcome :) (In reply to comment #5) > (In reply to comment #4) > > > > Feb 5 10:10:01 qlipah CROND[18178]: (root) CMD (test -x /usr/sbin/run-crons > > && /usr/sbin/run-crons ) > > Feb 5 10:10:01 qlipah CROND[18179]: (root) CMD (root^Itest -x > > /usr/sbin/run-crons && /usr/sbin/run-crons ) > > > And that's what confuses me. According to these two lines, the command will > first be executed successfully (without the "root" being prepended) and then > something is prepending the command with "root" which fails. Did you check It was my impression too, but I was not able to undertend how. > that there's no other crontab which might contain that command? ("crontab > -l" as root for example) # crontab -l # for cronie # $Header: /var/cvsroot/gentoo-x86/sys-process/cronie/files/cronie-1.2-crontab,v 1.2 2009/05/12 09:10:59 bangert Exp $ # Global variables SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/ # check scripts in cron.hourly, cron.daily, cron.weekly and cron.monthly 59 * * * * rm -f /var/spool/cron/lastrun/cron.hourly 9 3 * * * rm -f /var/spool/cron/lastrun/cron.daily 19 4 * * 6 rm -f /var/spool/cron/lastrun/cron.weekly 29 5 1 * * rm -f /var/spool/cron/lastrun/cron.monthly */10 * * * * test -x /usr/sbin/run-crons && /usr/sbin/run-crons ...oops! It's really what I should say, beside "I'm sorry". My error was to call # crontab /etc/crontab after the installation; this way causing the duplication of the commands in the logs. Since I used other cron daemons, I did add mechanically this command (see comment #4). Besides that, I assume that 'personal' crontab were executed first (with errors), then removed from list, leaving syscrontab unable to do anything. Hopefully, it's fixed now. Again, I'm sorry for twasting your time. Thank you. (In reply to comment #7) > ...oops! > It's really what I should say, beside "I'm sorry". Don't worry. This happened to all of us once or twice :) > My error was to call > > # crontab /etc/crontab > > after the installation; this way causing the duplication of the commands in > the logs. Yeah, that's not how the /etc/crontab file is supposed to be used. > Since I used other cron daemons, I did add mechanically this command (see > comment #4). Besides that, I assume that 'personal' crontab were executed > first (with errors), then removed from list, leaving syscrontab unable to do > anything. Hopefully, it's fixed now. > > Again, I'm sorry for twasting your time. > > Thank you. I'm glad you figured the problem out. Happy Gentooin' and have a nice day :) |