Re: Remotely Start/Stop Servicesby BrowserUk (Pope)
|on Feb 01, 2013 at 20:32 UTC||Need Help??|
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:
Win32::IntAuth might help you with the latter.
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.