Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Identify record in Global Catalog

Identify record in Global Catalog

Scheduled Pinned Locked Moved C#
tutorialquestionannouncement
10 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    robot_rock
    wrote on last edited by
    #1

    hi All, Suppose GC consists of a number of forests. with ldap search, i found a record in the GC and now want to update this record, but attribute which i want to update is not presented in GC. how to identify forest this record belongs to and what ldap port i must use to update this record in the forest?

    modified on Friday, January 11, 2008 10:46:33 AM

    J D 2 Replies Last reply
    0
    • R robot_rock

      hi All, Suppose GC consists of a number of forests. with ldap search, i found a record in the GC and now want to update this record, but attribute which i want to update is not presented in GC. how to identify forest this record belongs to and what ldap port i must use to update this record in the forest?

      modified on Friday, January 11, 2008 10:46:33 AM

      J Offline
      J Offline
      Justin Perez
      wrote on last edited by
      #2

      GC, forest? I don't understand what you are taking about. Are you refering to garbage collection? Give a little more detail to your question :)

      "If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")

      R 1 Reply Last reply
      0
      • J Justin Perez

        GC, forest? I don't understand what you are taking about. Are you refering to garbage collection? Give a little more detail to your question :)

        "If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")

        R Offline
        R Offline
        robot_rock
        wrote on last edited by
        #3

        Hi Justin, good catch for Indian :) GS is Global Catalog (GC). So GC contains info from number of Active Directory forests. thanks, max

        1 Reply Last reply
        0
        • R robot_rock

          hi All, Suppose GC consists of a number of forests. with ldap search, i found a record in the GC and now want to update this record, but attribute which i want to update is not presented in GC. how to identify forest this record belongs to and what ldap port i must use to update this record in the forest?

          modified on Friday, January 11, 2008 10:46:33 AM

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          You may wnat to actually say you're working with Active Directory and "Global Catalog" instead of GC. In .NET, GC normally stands for "Garbage Collector". The Global Catalog does NOT hold every property of every object. It holds a small subset of properties for all objects. Your command text probably starts with "GC://...", correct?? Well, to get at the full record, you have to start with "LDAP://...". The port number is there to talk to either the unsecured version of LDAP, or the secured version. What you're doing on that connection has nothing to do with the port number you use. You normally don't need to give it the port number since AD uses the stadnard LDAP ports, 389 for normal connections and 636 for SSL secured. But, to find the object, all you have to do is return the distiguishedName of the object your looking for from the Global Catalog. The distiguishedName will tell you the full path to the object, including which domain the object is in. You can then use that you get the object from LDAP so you can modify all the properties you want.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007

          R 1 Reply Last reply
          0
          • D Dave Kreskowiak

            You may wnat to actually say you're working with Active Directory and "Global Catalog" instead of GC. In .NET, GC normally stands for "Garbage Collector". The Global Catalog does NOT hold every property of every object. It holds a small subset of properties for all objects. Your command text probably starts with "GC://...", correct?? Well, to get at the full record, you have to start with "LDAP://...". The port number is there to talk to either the unsecured version of LDAP, or the secured version. What you're doing on that connection has nothing to do with the port number you use. You normally don't need to give it the port number since AD uses the stadnard LDAP ports, 389 for normal connections and 636 for SSL secured. But, to find the object, all you have to do is return the distiguishedName of the object your looking for from the Global Catalog. The distiguishedName will tell you the full path to the object, including which domain the object is in. You can then use that you get the object from LDAP so you can modify all the properties you want.

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                 2006, 2007

            R Offline
            R Offline
            robot_rock
            wrote on last edited by
            #5

            Dave, you're right! i work with Active Directory and Global Catalog. My command text always starts with "LDAP://..." but port is 3268 - port for GC. i know that 389 port is default port for LDAP. but aslo i know that this port can be changed. LDAP query i read from 3rd party programm and i don't know exactly would this query will point to GC or LDAP. So if query points to GC i want to find this record tin its forest. Or just LDAP://CN= will point to it?

            D 1 Reply Last reply
            0
            • R robot_rock

              Dave, you're right! i work with Active Directory and Global Catalog. My command text always starts with "LDAP://..." but port is 3268 - port for GC. i know that 389 port is default port for LDAP. but aslo i know that this port can be changed. LDAP query i read from 3rd party programm and i don't know exactly would this query will point to GC or LDAP. So if query points to GC i want to find this record tin its forest. Or just LDAP://CN= will point to it?

              D Offline
              D Offline
              Dave Kreskowiak
              wrote on last edited by
              #6

              robot_rock wrote:

              LDAP query i read from 3rd party programm and i don't know exactly would this query will point to GC or LDAP.

              GC queries always start with GC://, so if you're getting this a 3rd party app and it uses LDAP:// to begin it's command string, chances are it's not comming from the Global Catalog. If you're sure the result is comming from the Global Catalog, and you get the distinuishedName back from the query, that name will point directly to the object in question if you use it in another LDAP command string:

              LDAP://_distinguishedName_/_yourParameterList_
              

              Keep in mind though when you bind to an object, you only immediately get back some basic properties of the object. You need to tell it to retrieve either all of the remaining properties, or just specify which properties you need. After that, you can modify them and write the changes back to AD.

              A guide to posting questions on CodeProject[^]
              Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                   2006, 2007

              R 1 Reply Last reply
              0
              • D Dave Kreskowiak

                robot_rock wrote:

                LDAP query i read from 3rd party programm and i don't know exactly would this query will point to GC or LDAP.

                GC queries always start with GC://, so if you're getting this a 3rd party app and it uses LDAP:// to begin it's command string, chances are it's not comming from the Global Catalog. If you're sure the result is comming from the Global Catalog, and you get the distinuishedName back from the query, that name will point directly to the object in question if you use it in another LDAP command string:

                LDAP://_distinguishedName_/_yourParameterList_
                

                Keep in mind though when you bind to an object, you only immediately get back some basic properties of the object. You need to tell it to retrieve either all of the remaining properties, or just specify which properties you need. After that, you can modify them and write the changes back to AD.

                A guide to posting questions on CodeProject[^]
                Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                     2006, 2007

                R Offline
                R Offline
                robot_rock
                wrote on last edited by
                #7

                ok Dave. as i know LDAP://distinguishedName/yourParameterList will only work if machine, from what i'm binding to object, belongs to this forest, otherwise i must specify machine name and port in LDAP query, isn't it?

                thanks, max

                D 1 Reply Last reply
                0
                • R robot_rock

                  ok Dave. as i know LDAP://distinguishedName/yourParameterList will only work if machine, from what i'm binding to object, belongs to this forest, otherwise i must specify machine name and port in LDAP query, isn't it?

                  thanks, max

                  D Offline
                  D Offline
                  Dave Kreskowiak
                  wrote on last edited by
                  #8

                  If you use the distinguishedName, the domain information is already supplied and any controller in that domain can service the request. No, you don't have to specify the port, unless those domain controllers are not using the standard port numbers.

                  A guide to posting questions on CodeProject[^]
                  Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                       2006, 2007

                  R 2 Replies Last reply
                  0
                  • D Dave Kreskowiak

                    If you use the distinguishedName, the domain information is already supplied and any controller in that domain can service the request. No, you don't have to specify the port, unless those domain controllers are not using the standard port numbers.

                    A guide to posting questions on CodeProject[^]
                    Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                         2006, 2007

                    R Offline
                    R Offline
                    robot_rock
                    wrote on last edited by
                    #9

                    Dave, thank you very much. i'll try this. thanks max

                    thanks, max

                    1 Reply Last reply
                    0
                    • D Dave Kreskowiak

                      If you use the distinguishedName, the domain information is already supplied and any controller in that domain can service the request. No, you don't have to specify the port, unless those domain controllers are not using the standard port numbers.

                      A guide to posting questions on CodeProject[^]
                      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                           2006, 2007

                      R Offline
                      R Offline
                      robot_rock
                      wrote on last edited by
                      #10

                      but, one more question - if these DCs are using non-default ports, how should i connect them?

                      thanks, max

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups