Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!mailrus!uflorida!haven!ni.umd.edu!sayshell.umd.edu!louie From: louie@sayshell.umd.edu (Louis A. Mamakos) Newsgroups: comp.unix.wizards Subject: Re: Cron jobs running as something other than root Message-ID: <1990Sep1.212327.16176@ni.umd.edu> Date: 1 Sep 90 21:23:27 GMT References: <26d9499b.2715@petunia.CalPoly.EDU> <1990Aug29.110345.19301@cbnews.att.com> <1990Aug30.145743.2949@chinet.chi.il.us> Sender: usenet@ni.umd.edu (USENET News System) Distribution: na Organization: The University of Maryland, College Park Lines: 50 Nntp-Posting-Host: sayshell.umd.edu Why don't you just get the 4.3BSD cron, which adds an additional field which specified the user you want the process to run as. None of this silly piping stuff to 'su'. louie example: 0,15,30,45 * * * * root /usr/lib/atrun 5 5 * * * root find /usr/spool/lpd -mtime +7 -a -exec rm -f {} \; 9 5 * * * root find /usr/spool/at/past -atime +2 -a -exec rm -f {} \; 15 5 * * * root find /usr/man/cat? -atime +14 -exec rm -f {} >/dev/console \; 30 5 * * * root /usr/adm/saveacct 50 23 * * * root /bin/sh /usr/local/adm/daily.sh 2>&1 | mail sys-staff 0 3 * * * root /etc/setcl -s umd1.umd.edu 15 3 * * 1 root /usr/adm/weekly # # Archive things in /usr/adm on the first day of the month # 5 0 1 * * root /usr/local/adm/acct.monthly # # Check the various dialup modems on week nights. # 0 3 * * 1,2,3,4,5 root /usr/local/etc/dialup/dialup.sh # # # Ultrix Field Test QAR submitter # 0 11,20 * * * qar /usr/local/lib/qar/nightly.sh # # %UUCPSTART% - uucp related entries, put here by uucpsetup 30 * * * * uucp /usr/lib/uucp/uucp.hour 0 6 * * * uucp /usr/lib/uucp/uucp.day 0 12 * * * uucp /usr/lib/uucp/uucp.noon 0 3 * * 1 uucp /usr/lib/uucp/uucp.week 0 2 * * * uucp /usr/lib/uucp/uucp.night #30 2 1 * * uucp /usr/lib/uucp/uucp.longhall # %UUCPEND% # # News stuff # 5,20,35,50 * * * * news /usr/local/lib/news/nntpsend 15 * * * * news /usr/local/lib/newsbin/input/newsrun 40 * * * * news /usr/local/lib/newsbin/batch/sendbatches 59 0 * * * news /usr/local/lib/newsbin/expire/doexpire 45 3 * * * news /usr/local/lib/newsbin/expire/superkludge comp.mail.maps 10 8 * * * news /usr/local/lib/newsbin/maint/newsdaily 00 5,13,21 * * * news /usr/local/lib/newsbin/maint/newswatch