OpenLDAP 自定义属性 增加报错:ldap_add: Invalid syntax (21)
自己在Core.scheam中定义了属性 permid:
是这样粘贴membe写的:
attributetype ( 2.5.4.119 NAME 'permid'
DESC 'RFC2256: permid of a group'
SUP distinguishedName )
将它加入了 objectclass:groupOfNames中。然后增加 ldif是这样的:
dn: cn=档案借阅6,cn=菜单,o=ou,cn=wellsoon,cn=resources
objectClass: top
objectClass: groupOfNames
cn: 档案借阅6
member:cn=root
permid: A001
但是报错:
ldap_add: Invalid syntax (21)
additional info: permid: value #0 invalid per syntax
开始以为是空格的问题。但是在查看了错误代码之后,了解到,可能是属性定义错误,于是从新定义属性即可。
attributetype ( 2.5.4.119 NAME 'permid'
DESC 'RFC2256: permid of a group'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{1024} )
这是对应的错误代码解释:
0x15 | 21 | LDAP_INVALID_SYNTAX: Indicates that the attribute value specified in an add, compare, or modify operation is an unrecognized or invalid syntax for the attribute. 在add、 compare或者modify 操作中指定的属性值,是不认识或者无效的 syntax 。 |
这是对属性的解释:
关于ldap的自定义属性
http://blog.163.com/duanhehui0928@126/blog/static/115272342201031122227764/
写的很好,可以参考!
阅读全文类别:Ldap 查看评论