尝试加载以下配置时
dn: olcDatabase={1}hdb,cn=config
changetype: modify
add: olcMirrorMode
olcMirrorMode: TRUE
我收到以下错误:
root@box:~# ldapadd -Y EXTERNAL -H ldapi:/// -f mirrormode.ldif
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
ldapadd: wrong attributeType at line 4, entry "olcDatabase={1}hdb,cn=config"
在我看来一切正常——有什么问题吗?
答案1
问题原来是出在这一行的尾随空格:
add: olcMirrorMode
呼呼!
答案2
答案3
就我而言,我忘记在多个更新之间添加连字符。
错误的:
dn: cn=John Doe,ou=user,dc=example,dc=com
changetype: modify
add: disabled
disabled: 0
add: activity
activity: INACTIVE
ldapmodify: wrong attributeType at line 5, entry "cn=John Doe,ou=user,dc=example,dc=com"
正确的:
dn: cn=John Doe,ou=user,dc=example,dc=com
changetype: modify
add: disabled
disabled: 0
-
add: activity
activity: INACTIVE