[sudo-users] Passing the uid sudo was run by

Paul Stepowski p.stepowski at qut.edu.au
Wed Dec 6 00:28:16 EST 2006

Hi list,

I was wondering if it's possible for a script to check which user sudo was run as.


paul at box$ sudo ./my_script
original uid=509(paul)

Is there any way for ./myscript to know the original uid of the user who ran
sudo?  If so, can this be done in such a way that the uid cannot be manipulated
by the user running "sudo ./myscript"?



More information about the sudo-users mailing list