On 13 Sep 99, Ian Flanigan <[EMAIL PROTECTED]> wrote:
> --- Erik Arneson <[EMAIL PROTECTED]> wrote:
> 
> > Hmmm.  I really don't know.  What is the file's uid and gid ownership
> > used for?  Are there any other commands which return this sort of
> > information?  You mentioned already that 'id' doesn't work on all
> > systems.  Maybe there's something else?
> 
> If you wanted to be wicked-gross, you could look for perl and do:
> 
>     perl -e 'print "uid=$> euid=$< groups=$( egroups=$)\n";'
> 
> Or write a small C program to do the same and hunt for the compiler.  This is
> probably a bit too much, but you could do it.
> 
> Other things that muck with uid are:
> 
>     whoami
>     /proc/self/status
>     
> Or you could use a bit-o-shell-script like:

I don't think anybody is going to want random shell scripts copied to
their other accounts...or C code.  I know that bash puts your uid in
$UID and the effective uid in $EUID.

On FreeBSD, whoami only displays your username, and the /proc filesystem 
doesn't contain anything that'd be of use.  Go figure, huh?

-- 
# Erik Arneson      [EMAIL PROTECTED]    Webring Software Engineer #
# Yahoo! Inc.      PGP ID: 2048/84413E19        (541) 482-3000x114 #
# "There's such a fine line between stupid and clever." Spinal Tap #

Reply via email to