Clyde,

 

Just a bit of advice, are you sure the attributes you are actually searching for are being replicated to the GC? Not all attributes are replicated to the GC, if you would like to alter this , use the Active Directory Schema MMC to view the attribueSchema, find the attributes that you would like to search on the GC for, double click and check if  "Replicate this attribute to the Global Catalog" check box is checked. Be warned though the more attributes you add the bigger the replication size that has to take place * (* depending on the ver of Windows Server you running)

 

I have code that will return the Global Catalog server for either a forest or domain but it's in Vb.NET if you want it just let me know.

 

HTH

LDAP programming? - Http://groups.yahoo.com/group/adsianddirectoryservices

Carlos Magalhaes ADSI MVP

 


From: Creamer, Mark [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 17, 2003 12:36 AM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] finding GCs

 

Clyde, try using the GC://RootDSE serverless bind that Gil pointed out to me. I think it'll save you some steps by connecting directly to a GC in the domain you're in

 

<mc>

-----Original Message-----
From: Burns, Clyde [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 4:37 PM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] finding GCs

 

I use this vbscript to first bind to rootdse in the domain I am in.

Then use the results to build the global catalog string for my ado search.

 

I dont think it would be too difficult to convert to VB.

 

----------------------------------------------------------------------------------------------------
Set RootDse = GetObject( "
LDAP://RootDse" )
Path = chr(60) & "GC://" & _
 RootDse.get( "DefaultNamingContext" ) & _
 chr(62) & chr(59)

 

Set objConnection = CreateObject("ADODB.Connection")
objConnection.Open "Provider=ADsDSOObject;"

 

Set objCommand = CreateObject("ADODB.Command")
objCommand.ActiveConnection = objConnection

 

objCommand.CommandText = _
     Path & "(&(objectCategory=person)(sn=*smi*));" & _
            "mail,sn,DisplayName;subtree"

 

Set objRecordSet = objCommand.Execute

 

If objRecordset.EOF Then
    Wscript.Echo _
        "No email accounts found with this last name."
Else
    Wscript.Echo _
  "Email account(s) with the specified last name"
    While Not objRecordset.EOF
    Wscript.Echo objRecordset.Fields("DisplayName") _
 & vbtab _
 & objRecordset.Fields("mail")
    objRecordset.MoveNext
    Wend
End If

 

objConnection.Close

 

----------------------------------------------------------------------------------------------------

Not sure if this will help or not. But its the way I always ensure I hit a GC in the domain Im in, no matter which domain Im in.

 

Clyde Burns

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mulnick, Al
Sent: Tuesday, December 16, 2003 3:53 PM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] finding GCs

Gil's post should provide the information they need to do this.  Did you catch that one the other day?

 


From: Creamer, Mark [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 2:46 PM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] finding GCs

According to the developers, the app is trying to do 2 things:

 

1.      Query a universal group membership for one purpose

2.      Query a global group membership for a specific domain for another purpose

 

So, they tell me they can specify the domain in their code. What they are looking for is how can they find a server that meets both needs (DC and GC) in that specific domain. The query would essentially say, "return a global catalog server in my.domain.com" (as opposed to a GC in domain.com or myother.domain.com)

 

They need to do this in VB

 

Thanks!

 

<mc>

-----Original Message-----
From: Creamer, Mark
Sent: Thursday, December 11, 2003 3:24 PM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] finding GCs

 

I think it's a compiled application that is called by the web app. But I'll know more tomorrow. We're supposed to meet to discuss it. I'll at least try to find out what they're doing a little more clearly

 

<mc>

-----Original Message-----
From: Tony Murray [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 3:18 PM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] finding GCs

 

Mark, can you maybe post the code, as this will help us pinpoint the problem?  If you have multiple domains, it probably depends more on which domain the universal group was created in than whether the DC is a GC or not. 

 

Tony

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mulnick, Al
Sent: Donnerstag, 11. Dezember 2003 19:14
To: '[EMAIL PROTECTED]'
Subject: RE: [ActiveDir] finding GCs

IIRC You're looking for the isGlobalCatalogReady attribute.  If set to true, then it's a global catalog.  If not, then it's just a DC.

 

Al

 


From: Creamer, Mark [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 12:41 PM
To: [EMAIL PROTECTED]
Subject: [ActiveDir] finding GCs

Our developers put together a web site on our intranet last year that allows privileged users to add members of their staff to various groups. It works great, except that now we are in native mode and are using some universal groups. The app will work properly as long as it happens to hit a DC that is also a GC. But from what they're telling me, it won't work for Universals if the app searches for a DC and finds one that does not happen to be a GC.

 

So what I'm looking for, is whether there is a LDAP query component that they can use in their app that will always only find DCs that are also GCs?

 

Thanks,

 

Mark Creamer

Systems Engineer

Cintas Corporation

Honesty and Integrity in Everything We Do

 


This message is confidential, intended only for the named recipient(s) and may contain information that is privileged or exempt from disclosure under applicable law. Any patient health information must be delivered immediately to intended recipient(s). If you are not the intended recipient(s), you are notified that the dissemination, distribution or copying of this message is strictly prohibited. If you receive this message in error, or are not the named recipient(s), please notify the sender at either the e-mail address or telephone number above and discard this e-mail. Thank you.

-------------------------------------------------------------
This email and any files transmitted are
confidential and intended solely for the
use of the individual or entity to which
they are addressed, whose privacy
should be respected.  Any views or
opinions are solely those of the author
and do not necessarily represent those
of the Trencor Group, or any of its
representatives, unless specifically
stated.  

Email transmission cannot be guaranteed
to be secure, error free or without virus
contamination.  The sender therefore
accepts no liability for any errors or
omissions in the contents of this message,
nor for any virus infection that might result
from opening this message.  Trencor is not
responsible in the event of any third party
interception of this email.   

If you have received this email in error please notify
[EMAIL PROTECTED]   For more information about
Trencor, visit www.trencor.net <http://www.trencor.net>

Reply via email to