in reply to cgi wrapper??

I have a script that copies out another perl script to a remote machine and i want to execute it locally on the remote machine

I am not entirely sure what you mean by this.

If you are refering to this thread, perrin mentioned a cgi wrapper or SOAP. I'll elaborate.

You can set up a website on the remote server - if it's Win2k, then IIS is installed, or you can install Apache. Whichever you use, make sure your servers have all the latest security patches.

On this remote website you have a simple CGI script which will execute a "selection" of programs - or the program you just copied. make sure that it's not allowed to execute any old program.

Your local script then executes the remote script using LWP. I.e. you POST or GET the URL of the script on the remote webserver.

I know you mention no SOAP, but if Perl is installed on the remote machine, SOAP::Lite is installed with it (at least I think it is with AS Perl. And it's not too difficult to use SOAP

Error: Keyboard not attached. Press F1 to continue.

Update: If Perl is not installed on all 300 of the remote machines - then this will not work (Not to mention that it would take days to set up 300 websites for this!!!). Also, if you are ruling out WMI, then I don't think there is a Perl solution (not that WMI has anything to do with Perl!). In which case check out psexec as I mentioned in your previous question. With psexec, it can be as simple as:
use strict; # etc... my @servers = ("\\\\server1", "\\\\server2", "\\\\server3"); foreach my $server (@servers) { my $error = system ("psexec", $server, "-u", "username", "-p", "password", "remote_program name"); warn "failed to execute on $server ($error), $!" if $error; }

Replies are listed 'Best First'.
Re: Re: cgi wrapper??
by RayRay459 (Pilgrim) on Aug 28, 2001 at 20:05 UTC
    I do have perl installed on all the machines. My 300+ machines are web servers. Just so you know where i am at. Thank you for your help. I do appreciate it. We were told not to use psexec because it copies itself to the system32 directory and could be a possilbe exploit. Damn i hate limits. :)
    Thanks again.
    Ray