-----Original Message-----
From: Michael Dube [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 12, 2001 11:19 AM
To: Perl Beginners List
Subject: Remote command execution on NT and Solaris?
I have just begun a project that will involve automated state setting on
multiple machines across multiple platforms (NT & Solaris). At this point
I
believe this will be done by writing scripts for each platform and having a
centralized system (NT or Solaris) execute a script which will instruct
each
of the other systems to run their initialization script.
Is there a PERL module available which will facilitate remote command
execution for NT and Solaris?
Any suggestions on the best way to do this?
Thanks,
Mike
Mike,
Here are a couple of alternatives to Steve Howard's suggestions on how to
access your NT boxes remotely.
1) Remote Shell Service. Which is part of the NT resource kit. This
allows you to remsh (or rsh) from a unix host if trust is given in a
.rhosts file.
- runs as a service and can be given the administrator account to run
under.
- can execute scripts from here. Handy if scripts reside on a Samba
or NT server, but could be local, too.
- easy to install:
- Make sure rshsetup.exe, rshsvc.dll, rshsvc.exe is
in C:\winnt\system32 (Windows dir).
- Run: rshsetup c:\winnt\system32\rshsvc.exe c:
\winnt\system32\rshsvc.dll
- Put .rhosts in C:\winnt\system32\drivers\etc with trusted
hostnames.
- Start Remote Shell Service with "automatic" and administrator
acct.
2) Program a client and a server script in perl that uses sockets for
communication. See Camel Book pp. 348 for samples. This takes more
effort but can be used on multiple platforms (as both clients and servers)
using the perl script to detect what OS is running ( $my_os=$^O ) and
handle accordingly.