将用户添加到OpenLDAP服务器时出现问题。
dn: uid=ldapuser1,ou=People,dc=infra,dc=com
uid: ldapuser1
cn: ldapuser1
sn: ldapuser1
mail: ldapuser1@ABC.com
mailRoutingAddress: ldapuser1@ABC.com
mailHost: mail.ABC.com
objectClass: inetLocalMailRecipient
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: top
objectClass: kerberosSecurityObject
objectClass: shadowAccount
userPassword: {crypt}$6$JNpQAF00$y9tYggGaYWlKfPqhx.
shadowLastChange: 16947
shadowMax: 99999
shadowWarning: 7
krbName: ldapuser1@ABC.COM
loginShell: /bin/bash
uidNumber: 534
gidNumber: 537
homeDirectory: /home/ldapuserdir/ldapuser1
执行以下命令时,它会给出错误
ldapadd -x -W -D "cn=Manager,dc=infra,dc=com" -f /etc/openldap/users.ldif
Enter LDAP Password:
adding new entry "uid=ldapuser1,ou=People,dc=infra,dc=com"
ldap_add: Invalid syntax (21)
additional info: objectClass: value #6 invalid per syntax
包含架构:
include /etc/openldap/schema/corba.schema
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/duaconf.schema
include /etc/openldap/schema/dyngroup.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/java.schema
include /etc/openldap/schema/misc.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/openldap.schema
include /etc/openldap/schema/ppolicy.schema
include /etc/openldap/schema/collective.schema
如何解决这个问题?如果需要更多细节,请告诉我。
答案 0 :(得分:0)
从0开始对属性进行编号,#6为kerberosSecurityObject
,在任何这些模式中都不存在。