Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running a script as a different user

Status
Not open for further replies.

lytus

MIS
Jun 17, 2004
48
US
Hi all, I have written a script that pulls back information from web sites. It runs fine as long as I am running it, but when I run it through Tivoli Monitoring, it fails because Tivoli uses a local admin account and not a domain user. What I need to know how to do is in the code make the script run as a different user other than the one it is being kicked off by.
Any help would be appreciated, and it MUST run in Tivoli, there is no other option for us than that.

Thanks.
 
Hello lytus!

I'm not sure of anyway to change who is running the script durring execution, but I do know you can control this via windows scheduling.

If you want this script to run on demand, perhaps you could write a script to execute a scheduler task? Or, perhaps you could invoke your script from another script or command file using a runas function?

I hope that points you in the right direction, sorry I don't have any examples.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top