To be honest, we are only using one OU at the moment, so I haven't had to
drill down like that yet (we're in the middle of an NT-2k migration).  I'll
see if I have any notes anywhere on this.

-----Original Message-----
From: Stuart Kendrick [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 27, 2003 8:15 AM
To: Tim Johnson
Cc: [EMAIL PROTECTED]
Subject: RE: timeouts / Win32::TieRegistry


Hi Tim,

Hmm.  OK, that would be a performance boost.  Not all the machines for which
I'm responsible have machine accounts in the W2K Active Directory ... so at
some point, I need to attach to every machine ...  but I can see how I could
improve performance by going after that particular list.

no, wait a minute.  Since I have to attach to every IP address anyway, to
see whether or not I 'own' it, grabbing the list of 'known' machines
wouldn't reduce total execution time, though it would allow me to stack my
hits up front, so to speak.

How do I go about listing all the machines in a given OU?  Let's see, an
LDAP search against an Active Directory domain controller?

--sk


On Sun, 26 Oct 2003, Tim Johnson wrote:

>
> Maybe instead of trying to attach to every computer your IP range, you 
> should just grab a list of computers on your domain, ping each one, 
> and then go for the registry once you've verified that it is on the 
> network?
>
> -----Original Message-----
> From: Stuart Kendrick [mailto:[EMAIL PROTECTED]
> Sent: Sunday, October 26, 2003 8:39 PM
> To: [EMAIL PROTECTED]
> Subject: timeouts / Win32::TieRegistry
>
>
> Hi,
>
> Does anyone know how to fiddle with timeouts when using 
> Win32::TieRegistry?
>
> I have a routine which walks through my IP space, figuring out whether 
> or not I have read access to the registry of each machine.  If I do, I 
> want to do something (install a patch); if I don't, then I want to 
> move on to the next IP address.
>
> [...]
>   # If we can attach to the registry and read System{Identifier}, set
>   # $ours to 1
>   if ($key = 
> $Registry->Open("//$target/LMachine/HARDWARE/DESCRIPTION/System/",
> {Access=>KEY_READ}) ) {
>     if ($identifier = $key->GetValue("Identifier") ) {
>       $ours = 1;
>     }
>     else {
>       $ours = 0;
>     }
>   }
>   else {
>     $ours = 0;
>   }
>
>
> Works fine.  But on machines which aren't "ours", Win32::TieRegistry 
> is persistent ... spends ~25 seconds trying before giving up.  I'm 
> staring at a packet trace right now ... spends most of its time trying 
> and failing to establishing a TCP connection to port 139 and then port 
> 445 ... eventually it tries, and succeeds, in connecting to port 135, 
> does some RPC stuff, tears down the connection, and moves on.
>
> Anyway, I'd like to speed this up.  Blowing 25 seconds on a machine to 
> which I don't have access burns a lot of time ... I have thousands of 
> machines to traverse, most of which I don't own.
>
> Does anyone know of a way to tell Win32::TieRegistry not to bother 
> with ports 139 and 445?  Or to shrink its timeouts?  Or, can anyone 
> think of another (faster) way I could prove to myself whether or not I 
> have sufficient privileges to read a remote machine's registry?
>
> --sk
>
> Stuart Kendrick
> FCHRC
>
> _______________________________________________
> Perl-Win32-Admin mailing list 
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to