in reply to Remotely Start/Stop Services
What I am looking for is the ability to run the script on my machine and remotely start/stop the services.
To do that, the user id under which you run the program locally will require the permissions to act on the remote machine.
Right now if I put in a hostname in my script I return nothing.
"I return nothing" is a piss poor description. I assume you mean that the attempt fails, but that's a great leap from what you written.
Perhaps you mean something like: "I get nothing returned"?
But even that fails to say what it is you get nothing returned from; what that "it" is, and what it is trying to do;. Even the nature of the "nothing" is important.
Ie. What api are you calling? What are you expecting to get returned from that API if it succeeded? What is the "nothing" you are getting back in failure? eg. 0, '', undef?
HAve you checked $^E after the failure?
To confuse things a bit I am an admin on the servers but I have an admin account for the servers and my user account for my machine.
Again, not a good description. I assume that you mean that you run the program local under your user account even though you have admin accounts on the machines you are trying to control.
As I said above, unless the user ID you use has the appropriate permissions on the remote machine to perform the action requested, it will fail.
You can either:
- give your local user id permissions on the remote machines;
- or programmically logon onto the remote system and obtain permissions that way.
Win32::IntAuth might help you with the latter.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Remotely Start/Stop Services
by dubl1n (Initiate) on Feb 01, 2013 at 21:24 UTC |