Using cron as a non-root user
From: banyan (banyan8_at_yahoo.com.sg)
Date: 10/21/05
- Next message: Philipp Pagel: "Re: Using cron as a non-root user"
- Previous message: Michael Heiming: "Re: defragmenting?"
- Next in thread: Philipp Pagel: "Re: Using cron as a non-root user"
- Reply: Philipp Pagel: "Re: Using cron as a non-root user"
- Reply: Paul Colquhoun: "Re: Using cron as a non-root user"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 21 Oct 2005 00:13:12 -0700
Folks,
I wanna allow a normal user to schedule a specific task, which entails
root permission to execute, using cron. I put a file as below in the
"/etc/cron.d" directory, where the "myprog" requires root priviledge to
run.
-----------------------------------------
SHELL=/bin/sh
PATH=/usr/local/sbin
# m h dom mon dow user command
22 17 19 10 * root myprog
-----------------------------------------
I then grant the normal user the write right to the file. However, cron
does not schedule the "myprog", when the user adds a new task entry
into the file. cron seems aware that it is not root that modify the
file.
Although I can crontab the file and make cron schedule the task, it is
not run as a root. How can I achieve my objective?
Regards,
Zhigao
- Next message: Philipp Pagel: "Re: Using cron as a non-root user"
- Previous message: Michael Heiming: "Re: defragmenting?"
- Next in thread: Philipp Pagel: "Re: Using cron as a non-root user"
- Reply: Philipp Pagel: "Re: Using cron as a non-root user"
- Reply: Paul Colquhoun: "Re: Using cron as a non-root user"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|