LDAP-LDIF添加属性错误:text=";AttributeType:值“0每个语法无效”;
我试图在LDAP中添加一个名为“FullName”的新属性。在Apache Directory studio中,我创建了一个新的LDIF文件:LDAP-LDIF添加属性错误:text=";AttributeType:值“0每个语法无效”;,ldap,ldif,Ldap,Ldif,我试图在LDAP中添加一个名为“FullName”的新属性。在Apache Directory studio中,我创建了一个新的LDIF文件: dn: cn=schema changetype: modify add: attributeTypes attributeTypes: ( 2.16.840.1.113719.1.1.4.1.120 NAME 'FullName' DESC 'fullname of an employee' EQUALITY
dn: cn=schema
changetype: modify
add: attributeTypes
attributeTypes: ( 2.16.840.1.113719.1.1.4.1.120
NAME 'FullName'
DESC 'fullname of an employee'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
-
add: objectClasses
objectClasses: ( 2.25.128424792425578037463837247958458780603.1
NAME 'fullname_attr'
DESC 'fullname_attr'
SUP inetOrgPerson
STRUCTURAL
MAY (FullName) )
属性OID表示全名,对象类OID表示自定义OID
当我尝试“执行LDIF”时,我的日志文件中有一条消息错误:
send_ldap_result: err=21 matched="" text="attributeTypes: value #0 invalid per syntax"
如何修复此问题?这在OpenLDAP中不起作用
cn=subschema
cn=schema,cn=config
来动态更改模式。注意,这也有一个特定的模式。在构造修改请求之前,您应该检查这一点
使用静态配置时,OpenLDAP服务器不接受通过LDAP进行的架构更改
您只需在slapd.conf中添加以下行:
自定义对象类也是如此。您使用的是哪台LDAP服务器?我使用的是OpenLDAP 2.4.31静态配置还是动态配置?这是一个静态配置更新了我的答案
attributetype ( 2.16.840.1.113719.1.1.4.1.120
NAME 'fullName'
DESC 'fullname of an employee'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )