Path: utzoo!attcan!uunet!cs.utexas.edu!rutgers!apple!oliveb!sun!sally!plocher From: plocher%sally@Sun.COM (John Plocher) Newsgroups: comp.mail.uucp Subject: Re: su uucp in crontabs/root ? Keywords: root uucp crontab su Message-ID: <101484@sun.Eng.Sun.COM> Date: 27 Apr 89 02:21:11 GMT References: <75@norsat.UUCP> <9449@dasys1.UUCP> Sender: news@sun.Eng.Sun.COM Reply-To: plocher@sun.UUCP (John Plocher) Organization: Sun Microsystems, Mountain View Lines: 37 >>such as 9,39 * * * * ulimit 5000; /bin/su -c "/usr/lib/uucp/uu... >>Can anyone tell me why this 'su' is neccessary? > > These daemons should run as user 'uucp', not because 'root' is > incapable of so doing, but because any resulting mail is from 'uucp', > so presumably more meaningful, and all the various log entries also > leave a better trail. The reason this is done in root's crontab is because only root can INCREASE the ulimit; the su is done for the above reason. If you put this into the uucp crontab entry you couldn't increase ulimit.. >>The new crontab is enabled with the command: >>crontab [filename] >>( I get strange behaviour if i just edit the crontab/uucp file without > Easy way to change your crontable: > > vi > :0r !crontab -l # read in existing crontable > [ do your editing, in vi, to your heart's content; then: ] > :%w !crontab # submit vi's buffer to crontab > :q! I have a shell script called /etc/vict which contains: -- -- /etc/vict -- -- -- |# | |F=/tmp/vict$$ | |crontab -l > $F | |vi $F | |crontab < $F ; rm $F | -- -- -- -- -- -- -- -- -- just su to whatever id you wish and type /etc/vict -John Plocher