What are CN, OU, DC in an LDAP search?

后端 未结 3 1656
野性不改
野性不改 2020-11-28 17:25

I have a search query in LDAP like this. What exactly does this query mean?

(\"CN=Dev-India,OU=Distribution Groups,DC=gp,DC=gl,DC=google,DC=com\");
         


        
3条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-28 17:40

    • CN = Common Name
    • OU = Organizational Unit
    • DC = Domain Component

    These are all parts of the X.500 Directory Specification, which defines nodes in a LDAP directory.

    You can also read up on LDAP data Interchange Format (LDIF), which is an alternate format.

    You read it from right to left, the right-most component is the root of the tree, and the left most component is the node (or leaf) you want to reach.

    Each = pair is a search criteria.

    With your example query

    ("CN=Dev-India,OU=Distribution Groups,DC=gp,DC=gl,DC=google,DC=com");
    

    In effect the query is:

    From the com Domain Component, find the google Domain Component, and then inside it the gl Domain Component and then inside it the gp Domain Component.

    In the gp Domain Component, find the Organizational Unit called Distribution Groups and then find the the object that has a common name of Dev-India.

提交回复
热议问题