添加用户
dn: uid=sampleuser,ou=people,dc=my-domain,dc=com
objectClass: top
objectClass: inetOrgPerson
cn: sample user
uid: sampleuser
Run Code Online (Sandbox Code Playgroud)
问题
[root@host ~]# ldapadd -x -W -D "cn=Manager,dc=my-domain,dc=com" -f user.ldif
Enter LDAP Password:
adding new entry "uid=sampleuser,ou=people,dc=my-domain,dc=com"
ldap_add: Invalid syntax (21)
additional info: objectClass: value #1 invalid per syntax
Run Code Online (Sandbox Code Playgroud)
尝试解决问题
更改inetOrgPerson为uidObject并再次创建用户:
[root@controller ~]# ldapadd -x -W -D "cn=Manager,dc=my-domain,dc=com" -f user.ldif
Enter LDAP Password:
adding new entry "uid=sampleuser,ou=people,dc=my-domain,dc=com"
ldap_add: Object class violation (65)
additional info: no structural object class provided
Run Code Online (Sandbox Code Playgroud)
尝试 2 解决问题
对象类inetOrgPerson未找到:

尝试 3 解决问题
无法添加inetOrgPerson架构:
[root@controller ~]# ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/inetorgperson.ldif
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
adding new entry "cn=inetorgperson,cn=schema,cn=config"
ldap_add: Other (e.g., implementation specific) error (80)
additional info: olcObjectClasses: AttributeType not found: "audio"
Run Code Online (Sandbox Code Playgroud)
已阅读且不包含解决问题的解决方案的来源
http://www.zytrax.com/books/ldap/ch3/
http://www.openldap.org/doc/admin24/schema.html
http://www.openldap.org/lists/openldap-software/200503/msg00640.html
http://www.openldap.org/lists/openldap-technical/201002/msg00147.html
http://www.openldap.org/lists/openldap-technical/201002/msg00139.html
inetOrgPerson取决于core和cosine。看起来你已经有了核心。加入余弦,然后加入inetorgperson。余弦应该在/etc/openldap/schema/cosine.ldif。
| 归档时间: |
|
| 查看次数: |
6634 次 |
| 最近记录: |