Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Running a perl script with root, changing to another user and then back to root?

by salva (Canon)
on Feb 15, 2018 at 15:38 UTC ( [id://1209230]=note: print w/replies, xml ) Need Help??


in reply to Running a perl script with root, changing to another user and then back to root?

Maybe setting the EUID (Effective User Id) is enough for your purposes: check $> documentation in perlvar.

Update: Though, note that you can do that only when the code running with the EUID changed is controlled by you and safe. Otherwise, it could be made to change the EUID again in order to execute arbitrary code as root.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1209230]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-03-29 07:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found