为什么 LDAP“memberUid”限制为 ascii,而“uid”却不是?

为什么 LDAP“memberUid”限制为 ascii,而“uid”却不是?

我从 ApacheDS (2.0.0-M21) 收到此错误:

ERR_04447_CANNOT_NORMALIZE_VALUE Cannot normalize the wrapped value ERR_04473_NOT_VALID_VALUE Not a valid value 'gu\C3\AApes' for the AttributeType 'attributetype ( 1.3.6.1.1.1.1.12 NAME 'memberUid'

当尝试“ldapadd” LDIF 条目时,例如:

# Admins, Groups, example.com
dn: cn=Admins,ou=Groups,dc=example,dc=com
objectClass: posixGroup
cn: Admins
gidNumber: 10002
description: Group account
memberUid: john
memberUid: gu\C3\AApes

用户导入成功(见下文)。

我猜问题在于“memberUid”必须是 ASCII“String(IA5)”,而“uid”可以是 Unicode。看来 MS Active Directory 的架构是相同的:

https://msdn.microsoft.com/en-us/library/ms677101(v=vs.85).aspx https://msdn.microsoft.com/en-us/library/ms680508(v=vs.85).aspx

为什么“memberUid”与“uid”不是同一类型?

# guêpes, people, example.com
dn: uid=gu\C3\AApes,ou=people,dc=example,dc=com
postalCode: 31000
shadowFlag: 0
uidNumber: 1000
title: System Administrator
initials: JD
shadowWarning: 7
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
shadowMin: 8
o: Example
l: Toulouse
shadowLastChange: 10877
gidNumber: 10000
shadowMax: 999999
shadowExpire: -1
userPassword: password
#mail: gu\C3\[email protected]
#homeDirectory: /home/gu\C3\AApes
homeDirectory: /home/guepes
cn: Spanish
sn: Wasp
displayName: Spanish Wasp
gecos: Spanish Wasp
givenName: SpanishWasp

相关内容