1827286 Members
1647 Online
109717 Solutions
New Discussion

root cron

 
SOLVED
Go to solution
Nobody's Hero
Valued Contributor

root cron

I have a need to give an application user access to roots crontab. Is this possible?
Yes I know its a bad idea, but we have a need.
UNIX IS GOOD
4 REPLIES 4
Jeeshan
Honored Contributor

Re: root cron

Hi

It's a very much worst idea.

If it's badly need, please ask user what kind of access he/she needs. Do change according to their need.

a warrior never quits
Robert-Jan Goossens
Honored Contributor

Re: root cron

Hi,

Yes this a bad idear! :-)

If there is no other solution I would install and configure sudo ( # sudo crontab -e root ).

http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/sudo-1.6.8p12/

Regards,
Robert-Jan
F Verschuren
Esteemed Contributor

Re: root cron

if you use sudo you have two options:
1
give user the right to to sudo his comand:

he can create his cron like:
5 0 * * * /appl/tsu/bin/sudo /bin/script.sh 1>/dev/null 2>&1

ore give the user the rights to do sudo crontab -e root
be aware you are giving away full root acces whit this!
Geoff Wild
Honored Contributor
Solution

Re: root cron

Why would an application user need continuous access to root's cron?

Instead, if they need something run as root - then ask them to give you the command they want - then you add it to root's cron.

If it is a script - then make sure it is no longer writable by them - ie chown it to root:sys.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.