whoami?

John F Haugh II jfh at rpp386.cactus.org
Thu Jan 3 00:02:01 AEST 1991


In article <1990Dec30.080938.21103 at xenitec.on.ca> edhew at xenitec.on.ca (Ed Hew) writes:
>Unless I'm missing something, why not simply
>
>if ( `logname` == "root" ) then

logname doesn't say who you are =now=.  the results
of logname will be incorrect if you are su'd to/from a
different user id.  id always reports your current
user name.
-- 
John F. Haugh II                             UUCP: ...!cs.utexas.edu!rpp386!jfh
Ma Bell: (512) 832-8832                           Domain: jfh at rpp386.cactus.org
"While you are here, your wives and girlfriends are dating handsome American
 movie and TV stars. Stars like Tom Selleck, Bruce Willis, and Bart Simpson."



More information about the Comp.unix.xenix.sco mailing list