My perl scripts should be able to change the common account to root account during execution and then continue to the rest commands. But I don't know how to do:
Change to root account and able to automatically pass authentication, I used following code, but failed.
system "echo \"$password\" | sudo -S su root";
Able to continue to do the rest scriptsI found when using scripts to change account (simply try system "sudo su";) , it is not able to execute rest scripts
I need to export proxy, but when i using the following code, it does not work:
system "export http_proxy=http://proxy.companyname.com:8080";