how to find the GC in an w2k domain?

Jim McDonough jmcd at us.ibm.com
Thu Jun 12 16:59:31 GMT 2003





There's an easier way, if you have DNS setup properly.  Query for the
record gc._msdcs.<dns domain name>
It's not even an SRV record, it's an A record, so just plain "host
gc._msdcs.mydomain.com" should do it.

----------------------------
Jim McDonough
IBM Linux Technology Center
Samba Team
6 Minuteman Drive
Scarborough, ME 04074
USA

jmcd at us.ibm.com
jmcd at samba.org

Phone: (207) 885-5565
IBM tie-line: 776-9984



|---------+------------------------------------------------------>
|         |           Anthony Liguori/Austin/IBM at IBMUS           |
|         |           Sent by:                                   |
|         |           samba-technical-bounces+jmcd=samba.org at list|
|         |           s.samba.org                                |
|         |                                                      |
|         |                                                      |
|         |           06/12/2003 11:32 AM                        |
|         |                                                      |
|---------+------------------------------------------------------>
  >----------------------------------------------------------------------------------------------|
  |                                                                                              |
  |       To:       qzhou at isilon.com                                                             |
  |       cc:       samba-technical at samba.org                                                    |
  |       Subject:  Re: how to find the GC in an w2k domain?                                     |
  |                                                                                              |
  >----------------------------------------------------------------------------------------------|




There's a MS-CLDAP query for it.  Essentially, one takes the list of
domain controllers in the DNS SRV record _ldap._tcp.dc._msdcs.DOMAIN then
sends out MS-CLDAP queries on the RootDSE for the Netlogon attribute with
a filter (&(DnsDomain=DOMAIN)(Host=myHost)(NtVer=\0\0\0\6)).  Then one
would look for an entry that has both ADS_CLOSET and ADS_GC set (and was
in your domain).

We don't have an api yet to do this in Samba but in Windows one would use:

DsGetDcName(NULL, domain, NULL, NULL, DS_GC_SERVER_REQUIRED, &dc_info);

See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netdir/ad/dsgetdcname.asp

for details.

Anthony Liguori
Linux/Active Directory Interoperability
Linux Technology Center (LTC) - IBM Austin
E-mail: aliguor at us.ibm.com
Phone: (512) 838-1208
Tie Line: 678-1208




Chere Zhou <qzhou at isilon.com>
Sent by: samba-technical-bounces+aliguor=us.ibm.com at lists.samba.org
11/06/2003 09:04 PM
Please respond to qzhou


        To:     samba-technical at samba.org
        cc:
        Subject:        how to find the GC in an w2k domain?



I mean the Global Catelog server.  Is there a LDAP query for that?








More information about the samba-technical mailing list