Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!lll-lcc!pyramid!decwrl!sun!guy From: guy@sun.uucp (Guy Harris) Newsgroups: net.unix-wizards Subject: Re: Cron questions Message-ID: <7921@sun.uucp> Date: Sat, 4-Oct-86 19:23:59 EDT Article-I.D.: sun.7921 Posted: Sat Oct 4 19:23:59 1986 Date-Received: Tue, 7-Oct-86 19:55:21 EDT References: <6300012@wvlpdp> <705@hropus.UUCP> Organization: Sun Microsystems, Inc. Lines: 23 > It is much nicer to do it like so: > > 30 * * * * /bin/su person -c "whatever" This only works if your "su" supports "-c". I think that was a System III addition. > > > > One method I have thought off is to have cron start a set uid program > > that checks if the user is root or the owner of cron. > > Are you a Berkeley site? We SVR-er's always have cron running as root. I don't think he's a Berkeley site; it's difficult to install a UNIX system on a person :-). If he's running at a 4.3BSD site (or probably 4.2BSD; the machine with our 4.2 archival source is being cranky, so I can't check), "cron" is running as root. (Sun's version runs "cron" as "root", so it was probably that way in 4.2BSD also.) I don't remember what V7 did; it may very well have run "cron" as "daemon" or something like that. -- Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com (or guy@sun.arpa)