Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 11/03/84 (WLS Mods); site astrovax.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!astrovax!wls From: wls@astrovax.UUCP (William L. Sebok) Newsgroups: net.bugs.4bsd,net.unix-wizards Subject: su in crontab Message-ID: <706@astrovax.UUCP> Date: Sat, 11-Jan-86 14:25:31 EST Article-I.D.: astrovax.706 Posted: Sat Jan 11 14:25:31 1986 Date-Received: Sun, 12-Jan-86 00:43:10 EST Organization: Princeton Univ. Astrophysics Lines: 17 Xref: watmath net.bugs.4bsd:1922 net.unix-wizards:16353 I just tripped over a rather puzzling anomaly. If I insert 08 * * * * su wls % exec /usr/ucb/whoami >>/mnt/wls/TST/Errors 2>&1 I get "root" in the file /mnt/wls/TST/Errors, while if instead I insert 12 * * * * echo /usr/ucb/whoami | su wls >>/mnt/wls/TST/Errors 2>&1 Then /mnt/wls/TST/Errors contains "wls". Can any one tell me what is going on? This is on a Vax running 4.2 BSD. I ran into this when trying to use rsh to transfer news to another machine. I am aware that the whoami manual entry lies, that it uses the real uid rather than the effective uid. I don't know in that case whether the man entry or the code behavior is correct. -- Bill Sebok Princeton University, Astrophysics {allegra,akgua,cbosgd,decvax,ihnp4,noao,philabs,princeton,vax135}!astrovax!wls