我正在尝试创建cutom字段和对象
DN: uid=55e44a75e4b0f16711714165,ou=people,dc=myDB,dc=com
我创建了ldif文件
dn: cn=schema
changetype: modify
add: attributeTypes
attributeTypes: (2.25.128424792425578037463837247958458780603.1
NAME 'adminStatus'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15)
attributeTypes: (2.25.128424792425578037463837247958458780603.2
NAME 'userStatus'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{1024})
add: objectClasses
objectClasses: (2.25.128424792425578037463837247958458780603.3
NAME 'statusPerson'
DESC 'statusPerson'
SUP inetOrgPerson
STRUCTURAL
MAY (adminStatus $ userStatus))
当我尝试添加
这样的文件时ldapadd -x -D cn=admin,dc=myDB,dc=com -W -f Desktop/statusPerson.ldif
它给出了错误
ldapadd: wrong attributeType at line 6, entry "cn=schema"
答案 0 :(得分:0)
LDIF规范声明在更改修改类型/属性时需要分隔符。
dn: cn=schema
changetype: modify
add: attributeTypes
attributeTypes: (2.25.128424792425578037463837247958458780603.1
NAME 'adminStatus'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15)
attributeTypes: (2.25.128424792425578037463837247958458780603.2
NAME 'userStatus'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{1024})
-
add: objectClasses
objectClasses: (2.25.128424792425578037463837247958458780603.3
NAME 'statusPerson'
DESC 'statusPerson'
SUP inetOrgPerson
STRUCTURAL
MAY (adminStatus $ userStatus))