Using cron as a non-root user

From: banyan (banyan8_at_yahoo.com.sg)
Date: 10/21/05


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



Relevant Pages

  • cron dilemma
    ... I wanna allow a normal user to schedule a specific task, ... root permission to execute, using cron. ... I then grant the normal user the write right to the file. ...
    (comp.unix.shell)
  • Re: Using cron as a non-root user
    ... | I wanna allow a normal user to schedule a specific task, ... | I then grant the normal user the write right to the file. ... However, cron ... cron seems aware that it is not root that modify the ...
    (comp.os.linux.setup)
  • Re: cron dilemma
    ... > root permission to execute, using cron. ... > I then grant the normal user the write right to the file. ... man sudoers ...
    (comp.unix.shell)
  • [Fwd: OpenBase SQL multiple vulnerabilities Part Deux]
    ... # Writing to roots crontab seems to be fairly prompt at handing out root shells ... This ensures that cron is running when the fake root crontab is created. ... the OpenBase family of products have been enabling some of the most innovative business applications ...
    (Bugtraq)
  • Re: user privledges
    ... > redhat 7.2 i created a user account for myself to use on a daily basis. ... > fare i have just been su - and entering the root pass. ... it started but would not install because i did ... sofware to /opt/musicmatch as a normal user. ...
    (comp.security.unix)