I'm writing a script that's run by users as sudo, and I'm trying to find the original user's id. Does anyone know how to do this?
eg: > ~$ id > uid=1002(sonia) gid=1002(sonia) groups=1002(sonia),27(sudo) > ~$ sudo bash > ~# id > uid=0(root) gid=0(root) groups=0(root) 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? Thanks for any help, -- Sonia Hamilton -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html