CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Advanced: Re: [iarro] Mysterious perl script behaviour: Edit Log



FishMonger
Veteran / Moderator

Mar 21, 2013, 7:59 AM


Views: 2104
Re: [iarro] Mysterious perl script behaviour

Try changing:

Code
$uid         = $ENV{SUDO_UID}; 
$uid = $< unless ( defined $uid );


to this:

Code
#$uid         = $ENV{SUDO_UID}; 
$uid = $>;


and execute the script with sudo instead of su

sudo -u user1 script.pl
sudo -u user2 script.pl
sudo -u user3 script.pl


(This post was edited by FishMonger on Mar 21, 2013, 7:59 AM)


Edit Log:
Post edited by FishMonger (Veteran) on Mar 21, 2013, 7:59 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives