Operating System - HP-UX
1832646 Members
2872 Online
110043 Solutions
New Discussion

CRON: Enable A Specific User To Run Scripts

 
SOLVED
Go to solution
Karl Balsmeier
Advisor

CRON: Enable A Specific User To Run Scripts

How does one, say, authorize the "N" account to be able use cron scripts on the server?

Is there a specific file to edit? Do I put them in the wheel group?

We run most of the enterprise databases, and developers are always asking for this in one form or another so they can tell when certain jobs have run with success.

Any help is much appreciated!
"Unix is the Net"
6 REPLIES 6
John Dvorchak
Honored Contributor
Solution

Re: CRON: Enable A Specific User To Run Scripts

You can add that user to /var/adm/cron/cron.allow and then they can create their own scripts to use with the crontab -e command.

man crontab

As far as being able to run scrips? The permission of the script in question would determine if it is executable for a given user:group
If it has wheels or a skirt, you can't afford it.
Jeff Schussele
Honored Contributor

Re: CRON: Enable A Specific User To Run Scripts

Hi Karl,

Entering the user's username in /var/adm/cron/cron.allow will allow that user to use cron.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
James R. Ferguson
Acclaimed Contributor

Re: CRON: Enable A Specific User To Run Scripts

Hi Karl:

Allowing (and/or disallowing) users to run cron jobs is controlled in '/var/adm/cron/cron.allow' and '/var/adm/cron/cron.deny' as described in the 'crontab' man pages.

The same mechanism applies for the use of 'at' or 'batch' jobs using '/var/adm/cron/at.allow' and '/var/adm/cron/at.deny'.

Regards!

...JRF...
Rodney Hills
Honored Contributor

Re: CRON: Enable A Specific User To Run Scripts

Just remember, the task will run as the user. Not as "root".

HTH

-- Rod Hills
There be dragons...
Karl Balsmeier
Advisor

Re: CRON: Enable A Specific User To Run Scripts

Do the change to cron.allow take place in real time, meaning no reboot, etc.?

Thanks for all of your help! Mucho points!
"Unix is the Net"
Michael Tully
Honored Contributor

Re: CRON: Enable A Specific User To Run Scripts

Yes the access is allowed mmediately after the changes have been made.

One further note. Try to avoid the use of 'crontab -e'

Use this method:
$ crontab -l >/tmp/work
make your changes and then save the file and submit it.
$ crontab /tmp/work
Anyone for a Mutiny ?