site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com User-agent: Thunderbird 2.0.0.6 (Macintosh/20070728) Thanks, Mike _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... I have a shell script that needs to get the LOGNAME env variable. But I need to run my script using sudo which apparently causes LOGNAME to incorrectly be set to "root". How can can I get the logged in user's name even when running a script using sudo? I need to get the user name because I need to build shell path to the current user's desktop and only the exact logged in user's name will work. This email sent to site_archiver@lists.apple.com