Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) 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:

  1. give your local user id permissions on the remote machines;
  2. or programmically logon onto the remote system and obtain permissions that way.

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.

In reply to Re: Remotely Start/Stop Services by BrowserUk
in thread Remotely Start/Stop Services by dubl1n

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-24 02:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found