[comp.unix.internals] [unix-wizards] Re: Cron jobs running as something other than root

phil@idas1 (09/07/90)

In article <1990Sep7.011642.22927@math.lsa.umich.edu> vixie@wrl.dec.com (Paul Vixie) writes:
>In article <1990Sep5.200114.1711@rosewall.citib> mjohn@king.UUCP (Michael Johnston) writes:
># If you are running BSD or flavors of System V you have available to you
># the 'crontab' command. Just create a crontab file for the USER you wish
># to run cron jobs for. Then su to the username you wish to install it for
># and say "crontab < your_cron_file". That's all folks.
>
>Not quite.  BSD through 4.3-reno doesn't have this.  4.4 will have it,
>in the form of my free version of cron (which uses crontab -uUSER rather
>than 'su USER;crontab' btw).  Grab it from gatekeeper.dec.com anon ftp
>/pub/misc/vixie/cron2.tar.Z.  (Will appear in comp.sources.unix shortly.)

You can also run an 'at' job, go to /usr/spool/cron/atjobs (or where ever 
your system puts such things) and copy your at job script off somewhere.  Be
sure to note the permissions on the file.

Now you have the basis for any command(s) you want to run from cron by
any user.  I often hack such scripts to get database engines to run
reports for me from cron.  But many applications that do not require
operator input will run this way.  Your environment is set in the script
that 'at' created, so most anything is possible.

-- 
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
| Phil Meyer  email: uunet!vitec!phil   Home: (214) 6254130                   |
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+