su in crontab (the answer)

berliner at convex.UUCP berliner at convex.UUCP
Fri Jan 17 02:36:00 AEST 1986


> /* Written 12:59 pm  Jan 13, 1986 by wls at astrovax.UUCP in net.bugs.4bsd */
> Of course it would be even better if there was a way in which one could tell
> cron directly under what uid an entry is to be run.  The System V cron and 
> the Version 8 cron (I think) already can do this.

If I remember correctly, the 4.3 BSD version of cron added a field which
would specify the user that the command would be run as.  For example:

00 05 * * * root find /usr/preserve -mtime +7 -a -exec rm -f {} \;
30  * * * * adm  /usr/adm/accounting > /dev/console

These crontab lines would execute the find as root and the accounting as adm
(no flames, please -- these are for examples only).

Brian Berliner
CONVEX Computer Corporation
{ihnp4,uiucdcs}!convex!berliner



More information about the Comp.bugs.4bsd.ucb-fixes mailing list