Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Changing user in perl script

by moof1138 (Curate)
on Mar 24, 2006 at 22:56 UTC ( #539113=note: print w/replies, xml ) Need Help??


in reply to Changing user in perl script

I am assuming you are on some kind of UNIX here, I am not sure how Windows handles this side of things.

Agreeing with others, if you can use sudo, this is what I would recommend.

If the script is running as root you can change your UID and or EUID. There are special variables $< and $> that hold them. This is dangerous, so you need to give a lot of thought to security, but I have run into an odd case where I have found this useful.

Replies are listed 'Best First'.
Re^2: Changing user in perl script
by Argel (Prior) on Mar 24, 2006 at 23:47 UTC
    Beginning with Windows 2000 Microsoft started including an su like comamnd called RunAs.exe.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2020-05-27 06:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (152 votes). Check out past polls.

    Notices?