From: unbewusst.sein@... (=?ISO-8859-1?Q?Une_B=E9vue?=) Date: 2010-10-07T19:05:25+09:00 Subject: Re: testing if a script is run via sudo Rahul Kumar wrote: > on my system, echo $USER gives root under sudo (mac os x). > > So in ruby: > > ENV['USER'] > > will return root under sudo user, and my name normally. > > Note that here i have done a "sudo bash" first. I'm using too Mac OS X (zsh as default shell) i don't get samething as u : imyt% sudo echo $USER Password: yt imyt% echo $USER yt imyt% however "yt" -is- a sudoer... -- � Comment peser sur le bulletin? Tu t'assieds dessus. � (Anonyme)