edhew@egvideo.UUCP (Ed Hew) (04/29/89)
In article <75@norsat.UUCP> dave@norsat.UUCP (Dave Binette) writes: >Our SCO XENIX 2.3.1 installation of usenet news suggests installing lines >such as 9,39 * * * * ulimit 5000; /bin/su -c "/usr/lib/uucp/uu... > >Can anyone tell me why this 'su' is neccessary? Without any research or certainty, I will hazard a guess that many sites would have restricted fileperms on some if not all of the files accessed by these crontabs entries, hence the need for a bit more power via the su command. I know that's the case here on my site. If anyone in SCO SoftTech is looking at this, a confirmation or correction is welcome. >The OS supports multiple crontabs: >/usr/spool/cron/crontabs/root >/usr/spool/cron/crontabs/uucp >/usr/spool/cron/crontabs/news > >and enables them with: >/usr/lib/cron/cron.allow which contains: >root >uucp >news Well, I don't know if the word "enable" is the correct one to be using here. It's my understanding that if you have a cron.allow file, then the specific user must be included in order for that user (root, uucp, news all being users for the sake of this particular part of the discussion) to be able to issue a cron'd command. If you *don't* create the cron.allow file, then the contents of the cron.deny file in /usr/lib/cron will take precedence in the opposite manner. >The new crontab is enabled with the command: >crontab [filename] Ok, what we're doing here is "installing" the new (modified) crontabs entry (read: modified file), ie, telling cron that changes have been made and/or that the file has been created (if it's a new file). I would caution to always install the file with crontab while logged in as the user who's name you want the file to bear. For eg. if you log in as root and use crontab to install your "uucp" crontabs file, there is a very good chance that crontabs will overwrite your existing root file with the contents of your uucp file, which is *not* what you want to do. I was not at all amused when that happened to me. >( I get strange behaviour if i just edit the crontab/uucp file without > submitting the changes via crontab {like it gets ignored} ) The last time I read RTFM, it said somethink like: "Cron reads the contents of /usr/spool/cron/crontabs _periodically_". "periodically" appears to mean when cron is restarted, which normally happens on bootup, however if you already have used crontab to initially install your /usr/spool/cron/crontabs/uucp file, then merely killing off cron and restarting at an opportune moment will force cron to read it. The crontabs command in it's current incarnation is new to 2.3.1 (SCO). Previously, merely killing and restarting cron would always do the trick. --ed {edhew@egvideo.uucp} >usenet: {uunet,ubc-cs}!van-bc!norsat!dave (Dave Binette) Ed. A. Hew Technical Trainer Xeni/Con Corporation work: edhew@xenicon.uucp -or- ..!{uunet!}utai!lsuc!xenicon!edhew home: edhew@egvideo.uucp -or- ..!{uunet!}watmath!egvideo!edhew # I haven't lost my mind, it's backed up on floppy around here somewhere!