什么是DN(Distinguished Names)

原文地址:http://lesca.me/archives/what-is-distinguished-names.html

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

Reference:

[1] Distinguished Names

版权声明 » LDAP:什么是DN(Distinguished Names)

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

 

 

1. DN与RDN

在LDAP协议中,DN用于指向一个LDAP对象,DN由一系列RDN(relative distinguished names)组成,RDN之间用“逗号”隔开,它是一个键值对,格式为:

attribute=value

下表列出了常见的RDN属性的类型:

StringAttribute type
DCdomainComponent
CNcommonName
OUorganizationalUnitName
OorganizationName
STREETstreetAddress
LlocalityName
STstateOrProvinceName
CcountryName
UIDuserid

以下是一些常见的DN:

CN=Users,DC=lesca,DC=bit
CN=Jeff Smith,OU=Sales,DC=Fabrikam,DC=COM

2. DN中的保留字符与转义

下表列出了DN中不能使用的保留字符,它们有特殊用途:

Reserved characterDescriptionHex value
 space or # character at the beginning of a string 
 space character at the end of a string 
,comma0x2C
+plus sign0x2B
double quote0×22
\backslash0x5C
<left angle bracket0x3C
>right angle bracket0x3E
;semicolon0x3B
LFline feed0x0A
CRcarriage return0x0D
=equals sign0x3D
/forwards slash0x2F

例如,如果在DN中含有“逗号”需要转义:

CN=Litware,OU=Docs\, Adatum,DC=Fabrikam,DC=COM

又如下面的DN含有“换行符”(CR, 0X0d):

CN=Before\0DAfter,OU=Test,DC=North America,DC=Fabrikam,DC=COM

 

转载于:https://www.cnblogs.com/jerain6312/articles/3957315.html

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值