[cvsnt] NetGetAnyDCName vs NetGetDCName

Mathieu Veurman MVeurman at seagull.nl
Thu Feb 5 14:09:29 GMT 2004


Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.


 
Apparently we're not the only one experiencing this behaviour. The next
part is taken from
http://tekweb.idi.ntnu.no/proginfo/activeperl/site/lib/Win32/lanman.html
#item_NetGetAnyDCName:


NetGetAnyDCName($server, $domain, \$dcname)

Returns the name of a domain controller in a specified domain. Does NOT
work with Trusted Domains. You get the error code 1355 (domain doesn't
exist). 
In this case proceed as follows: get your pdc or a bdc and execute the
NetGetAnyDCName call there. 


 # your primary domain name
 $my_domain = "my_domain";
 # a trusted domain name
 $trust_domain = "trust_domain";

 # get the pdc on your local machine for $my_domain
 NetGetDCName('', $my_domain, \$pdc);
 # now get a dc in the trusted domain
 NetGetAnyDCName($pdc, $trusted_domain, \$dc);



-----Original Message-----
From: cvsnt-bounces at cvsnt.org [mailto:cvsnt-bounces at cvsnt.org] On Behalf
Of Mathieu Veurman
Sent: Thursday, February 05, 2004 14:14
To: cvsnt at cvsnt.org cvsnt downloads at march-hare.com @CVSNT on Twitter CVSNT on Facebook
Subject: RE: [cvsnt] NetGetAnyDCName vs NetGetDCName

"As long as you have a trust relationship, it'll work."
 
That's the problem. We have a trust relationship, but it doesn't work.

-----Original Message-----
From: cvsnt-bounces at cvsnt.org [mailto:cvsnt-bounces at cvsnt.org] On Behalf
Of Tony Hoyle
Sent: Thursday, February 05, 2004 13:55
To: cvsnt at cvsnt.org cvsnt downloads at march-hare.com @CVSNT on Twitter CVSNT on Facebook
Subject: Re: [cvsnt] NetGetAnyDCName vs NetGetDCName

On Thu, 5 Feb 2004 13:24:08 +0100, "Mathieu Veurman"
<MVeurman at seagull.nl> wrote:


>If I substitute NetGetAnyDCName by NetGetDCName the PDC of the
>seagullirl domain is returned and all runs well. It looks like
>NetGetAnyDCName was added in version 1.56 of win32.c without any clear
>description why. What's the drawback to replace NetGetAnyDCName by
>NetGetDCName? If there is one, why not make a combination of both? If
>the first one fails the second one still has the possibility to come up
>with a valid dc.
>
NetGetAnyDCName is a lot faster on large networks - it'll generally
return a local DC... for example we have two DCs one in the UK and one
in the US, connected via VPN.  In the US NetGetDCName returns the DC
in the UK, which isn't acceptable.

Unless you have a really odd configuration this function is otherwise
identical to NetGetDCName - from the description:

"The NetGetAnyDCName function returns the name of any domain
controller (DC) for a domain that is directly trusted by the specified
server."

As long as you have a trust relationship, it'll work.

Tony

_______________________________________________
cvsnt mailing list
cvsnt at cvsnt.org cvsnt downloads at march-hare.com @CVSNT on Twitter CVSNT on Facebook
http://www.cvsnt.org/cgi-bin/mailman/listinfo/cvsnt https://www.march-hare.com/cvspro/en.asp#downcvs

_______________________________________________
cvsnt mailing list
cvsnt at cvsnt.org cvsnt downloads at march-hare.com @CVSNT on Twitter CVSNT on Facebook
http://www.cvsnt.org/cgi-bin/mailman/listinfo/cvsnt https://www.march-hare.com/cvspro/en.asp#downcvs




More information about the cvsnt mailing list
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook