Re: Windows Service Pack Information
by mr_mischief (Monsignor) on Apr 17, 2008 at 15:43 UTC
|
If you have an SSH server on the Windows machine, you could use Net::SSH, Net::SSH2, or Net::SSH::Perl to run the command and grab the output.
The Service Pack is one of the values exposed through Active Directory. You can use pretty much any LDAP client, with a little work, to talk to Active Directory since it is essentially YALI (Yet Another LDAP Implementation). There's a somewhat light-hearted article about how to get the information using ADO over at Dr. Scripto's Script Shop on MS TechNet. You should be able to query the same information using Net::LDAP, which has a nice HOWTO at Linux Journal. There's much more about LDAP at BIND 9.
| [reply] |
Re: Windows Service Pack Information
by pc88mxer (Vicar) on Apr 17, 2008 at 15:42 UTC
|
I'd probably set up an ssh daemon on the windows boxes so the Solaris machine can login and grab the output of srvinfo.exe. You can lock things down so that only specific commands can be executed.
If that's not possible, an alternative is to set up a Windows service that will give you the output of srvinfo.exe when you connect to it. The Windows service could be written in perl. You could even do it with a web server.
There might be some other possibilities using MS remote procedure call technologies.
| [reply] [d/l] [select] |
Re: Windows Service Pack Information
by BrowserUk (Patriarch) on Apr 17, 2008 at 15:54 UTC
|
Are the client machines in a secure network? If so, can you have the rsh service enabled on them?
If so, you could do something like:
my %configs;
for my $host ( @hosts ) {
%configs{ $host } = qx[ rsh $host -l user -n srvinfo];
}
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.
| [reply] [d/l] |
|
If you have rsh enabled on it then I'd think most security types would say that by definition don't have a secure network . . . :)
(Seriously there's better alternatives (such as ssh as was recommended elsewhere in the thread) that aren't gaping vulnerabilities begging to be exploited (they're smaller potential vulnerabilities which under active attack and countermeasure development :).)
The cake is a lie.
The cake is a lie.
The cake is a lie.
| [reply] |
|
| [reply] |
|
|
|
Re: Windows Service Pack Information
by roboticus (Chancellor) on Apr 17, 2008 at 15:58 UTC
|
martymart:
You might check to see if you can access the service pack information from WMI, and (of course) whether you can get your Solaris box to access WMI. (A brief scan of CPAN yields DBD::WMI which might do what you want.)
...roboticus
who hasn't used Solaris since v2 | [reply] |
Re: Windows Service Pack Information
by Anonymous Monk on Apr 17, 2008 at 15:21 UTC
|
Reverse engineer srvinfo? | [reply] |