Thanks all very much. I knew it was something easy... I just couldn't remember.
Thanks. --Alex On 9/21/06, Ben H Kram <[EMAIL PROTECTED]> wrote: > > From perldoc perlvar: > > $REAL_USER_ID > $UID > $< The real uid of this process. (Mnemonic: it's the uid you > came > from, if you're running setuid.) You can change both the > real > uid and the effective uid at the same time by using > POSIX::setuid(). Since changes to $< require a system > call, > check $! after a change attempt to detect any possible > errors. > > $EFFECTIVE_USER_ID > $EUID > $> The effective uid of this process. Example: > > $< = $>; # set real to effective uid > ($<,$>) = ($>,$<); # swap real and effective uid > > You can change both the effective uid and the real uid at > the > same time by using POSIX::setuid(). Changes to $> require > a > check to $! to detect any possible errors after an > attempted > change. > > (Mnemonic: it's the uid you went to, if you're running > setuid.) > $< and $> can be swapped only on machines supporting > setreuid(). > > Then you can use getpwuid() to look up the username if you like... > > .b > > cheers, > ben > > On Thu, Sep 21, 2006 at 11:30:08AM -0400, Alex Brelsfoard wrote: > > I know I've done this before, but I'm having a hard time finding my old > > code, and am not using the right search terms on google... > > All I am looking for is the quickest method to find the user who is > calling > > this script. > > This is a script that will only ever be run by shell command on a Linux > > system. > > > > Can anyone help me? > > > > Thanks. > > > > --Alex > > > > _______________________________________________ > > Boston-pm mailing list > > [email protected] > > http://mail.pm.org/mailman/listinfo/boston-pm > > -- > Benjamin Kram > [EMAIL PROTECTED] > 617.998.8592 > _______________________________________________ Boston-pm mailing list [email protected] http://mail.pm.org/mailman/listinfo/boston-pm

