Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbatt!ihnp4!inuxc!pur-ee!uiucdcs!convex!wvlpdp!john From: john@wvlpdp.uucp Newsgroups: net.unix-wizards Subject: Cron questions Message-ID: <6300012@wvlpdp> Date: Tue, 30-Sep-86 18:52:00 EDT Article-I.D.: wvlpdp.6300012 Posted: Tue Sep 30 18:52:00 1986 Date-Received: Sat, 4-Oct-86 11:44:56 EDT Lines: 32 Nf-ID: #N:wvlpdp:6300012:000:803 Nf-From: wvlpdp.uucp!john Sep 30 17:52:00 1986 What are people's favorite way to have cron to things as certain users. Does a "best" method exist? I have seen things like: 30 * * * * /bin/su foo < a/shell.script but does this work if user foo has a password? One method I have though off is to have cron start a set uid program that checks if the user is root or the owner of cron. The program then examines the first line of a shell script to obtain the user-id to set before fork/exec'ing /bin/sh to run the shell script. What, if anything, does this do to security etc. Sample script: # uidhere function of shell script end script Polite E-mail responses welcomed. John A. Ebersold World Video Library ihnp4!convex!ctvax!trsvax!hal6000!wvlpdp!john 2747 Airport Freeway Fort Worth, Texas 76111 (817)-831-3811