LDAP summary-- Python ldap

A DN is comprised of a series of RDNs (Relative Distinguished Names) found by walking UP the tree (DIT) to its root (or suffix or base) and is written LEFT to RIGHT unlike the file system analogy you see quoted everywhere which is written RIGHT to LEFT. If you are into analogies it's like more like a fully qualified domain name (FQDN). 

DNs and RDNs - Tree Hierarchy

DNs and RDNs - Tree Hierarchy

CN, OU, DC 都是 LDAP 连接服务器的端字符串中的区别名称(DN, distinguished   name) 

LDAP连接服务器的连接字串格式为:ldap://servername/DN   

其中DN有三个属性,分别是CN,OU,DC   

LDAP是一种通讯协议,如同HTTP是一种协议一样的! 

在 LDAP 目录中,

  • DC (Domain Component)
  • CN (Common Name)
  • OU (Organizational Unit)



LDAP 目录类似于文件系统目录。 
下列目录: 
DC=redmond,DC=wa,DC=microsoft,DC=com       

如果我们类比文件系统的话,可被看作如下文件路径:    
Com/Microsoft/Wa/Redmond   

例如:CN=test,OU=developer,DC=domainname,DC=com 
在上面的代码中 cn=test 可能代表一个用户名,ou=developer 代表一个 active directory 中的组织单位。这句话的含义可能就是说明 test 这个对象处在domainname.com 域的 developer 组织单元中

原文地址:https://www.cnblogs.com/SZLLQ2000/p/4815544.html