On Wed, Sep 08, 2004 at 11:23:43 +1000, Sonia Hamilton wrote:

> When I run the 'id' command it returns uid=1002. But after sudo'ing to
> root, the id command returns uid=0(root). How would I find the user's
> original id before they sudo'd to root?

sudo sets both real and effective id to root, so id can't tell you the
original id.  Try logname - it'll give you the user's login name (not
id), but it might only work for interactive shells.


Cheers,

John
-- 
"What do you mean? A handgun is a standard tool for a sysadmin, isn't
it?" 
            -- Kurt M. Hockenbury
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to