Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've added the user to group crontab and am using crontab -e (as user) to edit the file. I have ensured that the file ends with a blank line, and added the file /etc/cron.allow with root and user each on their own line. my cron job runs fine from /etc/crontab. I restarted cron after each change.

what else could i be missing?

P.S., as I replied to a comment below:

/var/log/cron does not exist. grep /var/log/messages | grep cron outputs nothing. to test for job execution, i added * * * * * user touch /home/user/wtf

grep CRON /var/log/syslog (these are the most recent two entries, after the first, seeing the 'grandchild' bit, i thought maybe crontab -e wouldn't accept absolute paths, so i tried just touch wtf

Dec 13 16:37:01 COMPUTER CRON[21855]: (username) CMD (username touch /home/username/wtf) 
Dec 13 16:37:01 COMPUTER CRON[21854]: (CRON) error (grandchild #21855 failed with exit status 127) 
Dec 13 16:37:01 COMPUTER CRON[21854]: (CRON) info (No MTA installed, discarding output) 
Dec 13 16:38:01 COMPUTER CRON[21871]: (username) CMD (username touch wtf)
Dec 13 16:38:01 COMPUTER CRON[21870]: (CRON) error (grandchild #21871 failed with exit status 127) 
Dec 13 16:38:01 COMPUTER CRON[21870]: (CRON) info (No MTA installed, discarding output)


when using crontab -e, there's no need to specify the user and in fact, it is not understood and becomes part of the executed command, hence the errors.

share|improve this question

On a typical system, you should not have to (a) add anyone to the crontab group or (b) edit cron.allow. The default behavior is, absent explicit configuration to the contrary, to allow everyone to run cron jobs. That said, the configuration changes you've made, though unnecessary, should not prevent things from working.

What do you see in your system logs? Depending on how your system is configured, you may find cron output in /var/log/cron. Can you give us an example of the cron job that is not running? How are you differentiating between, "cron is not running this job" and "cron is running this job but the job is not behaving correctly"?

share|improve this answer
/var/log/cron does not exist. grep /var/log/messages | grep cron outputs nothing. to test for job execution, i added `* * * * * user touch /home/user/wtf – nona Dec 13 '10 at 21:20
If you look in /etc/syslog.conf, where are cron messages configured to go? – larsks Dec 13 '10 at 21:27
/etc/syslog.conf does not exist – nona Dec 13 '10 at 21:32
found it! i'm gonna post the output in my OP – nona Dec 13 '10 at 21:33
I'm sure there's an analog there somewhere. A little detective work will probably locate it. – larsks Dec 13 '10 at 21:34

In RHEL4 the default behavior to allow non-root crontabs was changed, which I found undesirable. I restored the previous behavior by using this method:

sed -i 's%account    required    required   /lib/security/ accessfile=/etc/security/access-cron.conf%g' /etc/pam.d/crond
touch /etc/security/access-cron.conf

If you want to maintain the performance but allow a specific user, it might be helpful if you produce the errors in your logs.

At the time, I found this to be the best method for my needs. Creating an empty cron.deny file in /etc could potentially replicate the same performance.

share|improve this answer
i'm a bit nervous to run that command as I don't understand it in the least. is ubuntu RHEL compliant (honest question)? it doesn't seem like i should have to do anything like this. i'd post the logs if i could find them. please see my comment to larsks. thanks for your time though! – nona Dec 13 '10 at 21:23
It's modifying the crond pam file to specify the accessfile= parameter. – Warner Dec 13 '10 at 21:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.