in reply to (solaris) pbrun and the real user id

AFAIK su always changes both the real and effective UID (it did in my tests). Perhaps if you explain exactly what you're trying to do, we can come up with another way to do it.
  • Comment on Re: (solaris) pbrun and the real user id

Replies are listed 'Best First'.
Re^2: (solaris) pbrun and the real user id
by jfroebe (Parson) on May 12, 2005 at 21:40 UTC

    Actually, it depends on the implementation of su. I ended up using the who am i approach but it isn't full proof.

    sub whoami { return (split /\s+/, `/bin/who am i`)[0]; }

    Jason L. Froebe

    Team Sybase member

    No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1