real UID and sudo.

William R Ward bill at
Tue Nov 26 18:10:38 EST 2002

Todd C. Miller writes:
>In message <a409fa6ab6.a6ab6a409f at>
>	so spake  (jvargasm):
>>    when i execute:
>>    sudo who am i
>>    it returns the user i logged to the machine not root.
>That's because who uses the utmp file, it doesn't check uids.
>If you run /usr/ucb/whoami it will say "root".

Really?  Hm.  I always thought "whoami" was effective UID and "who am i"
was real UID.

What command will tell you both real vs. effective UID?  We had a
similar problem at my work, and my manager decided to not use sudo as
a result.


William R Ward            bill at
        Consistency is not really a human trait.
                         --Maude (from the film "Harold & Maude")

More information about the sudo-users mailing list