Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )

Advanced DNS Management
New ZoneEdit. New Managment.


Sign Up Now
Reply to this topicStart new topic
> Using Cron As Non-root User...not Working
post Apr 30 2004, 11:12 PM
Post #1

Whats this Lie-nix Thing?

Group: Members
Posts: 2
Joined: 30-April 04
Member No.: 2,870

Hi All,

not really a newbie, just really stumped & frustrated...I thought I knew cron but either I don't or it's not working properly...

here's the problem:

- trying to run a crontab as a non-root user

crontab cron_script

where cron_script is my crontab file;
after I do a:

crontab -l

it shows up fine there;

but when the time comes for the script to execute, it doesn't execute, and there is no log of the execution, nor an email sent to user indicating the status of the cron job

Here's what I've checked already:

/var/log/cron shows:

May 1 09:51:12 mysystem crontab[12695]: (myuser) REPLACE (myuser)
May 1 09:51:16 mysystem crontab[12696]: (myuser) LIST (myuser)
May 1 09:52:00 mysystem crond[12495]: (myuser) RELOAD (cron/myuser)

so, that shows that crond is allowing the non-root user to have a crontab

The frustrating part is that the root user CAN run exactly the same cron commands...

so, I thought it might have to do with a cron.deny or cron.allow file(s); well those parts seem to be working according to the documentation...
when neither file existed (which was by default), I was getting the same sort of stuff in my /var/log/cron file as shown above;
when the cron.allow file existed and was empty, myuser wasn't allowed to set a crontab, as shown by this snippet from /var/log/cron:

May 1 09:24:32 mysystem crontab[12457]: (myuser) AUTH (crontab command not allowed)

and finally, when I scrapped my cron.allow and put in a cron.deny (which was empty) and is now the current configuration, I was back to the original /var/log/cron messages I was getting before;

some stuff about my system:
Redhat Linux 7.1

rpm -qa | grep cron shows:


So, have I missed checking something? Is this a bug?

Thoughts? Ideas? Suggestions?

Go to the top of the page
+Quote Post
post May 5 2004, 06:55 AM
Post #2

Its GNU/

Group: Support Specialist
Posts: 1,439
Joined: 3-January 04
From: Germany
Member No.: 2,069


could you please tell us what is the command your are trying to run with cron ?

Robert B

Robert Becskei
May the source be with us!
AMD X2-3800 @ 2400Mhz
2048MB DDR 400Mhz
DFI Lanparty UT4 NF4 ULTRA-D
GeForce 7800GT
Pioneer DVD-RW
17inch Samsung Syncmaster 757NF
WinXP Pro (SP2)/ CentOS 4.3
Go to the top of the page
+Quote Post
post May 5 2004, 08:02 AM
Post #3

Whats this Lie-nix Thing?

Group: Members
Posts: 2
Joined: 30-April 04
Member No.: 2,870

I've tried various commands; initially, I had it running a "backup cleanup" script, and because I thought there was something wrong with script, I changed it to a simple "touch" command, to test out cron:


and, more recently:

/bin/touch /home/myuser/test.txt
Go to the top of the page
+Quote Post
post May 6 2004, 05:57 AM
Post #4

Its GNU/

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151

so, as the user, run the command:

crontab -e

and add this:

01 05 * * * /bin/touch /home/myuser/test.txt

then at 0501 you should see the cron has run.

You can substitute a different time ... say 2 minutes from your current time ... for testing

Johnny Hughes
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 15th July 2018 - 02:43 PM