4

Add a user

user.ldif

dn: uid=sampleuser,ou=people,dc=my-domain,dc=com
objectClass: top
objectClass: inetOrgPerson
cn: sample user
uid: sampleuser

Problem

[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

Attempt to solve the issue

Changing inetOrgPerson to uidObject and creating the user again:

[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

Attempt 2 to solve the issue

ObjectClass inetOrgPerson not found:

enter image description here

Attempt 3 to solve the issue

Unable to add the inetOrgPerson schema:

[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"

Sources that already have been read and do not contain a solution that solves the issue

http://docs.adaptivecomputing.com/viewpoint/hpc/Content/topics/1-setup/installSetup/settingUpOpenLDAPOnCentos6.htm

http://www.zytrax.com/books/ldap/ch3/

https://stackoverflow.com/questions/28938957/openldap-structural-objectclass-not-found

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

030
  • 5,901
  • 13
  • 68
  • 110

1 Answers1

7

inetOrgPerson depends on both core and cosine. It looks like you already have core. Add in cosine, then inetorgperson. Cosine should be at /etc/openldap/schema/cosine.ldif.

84104
  • 12,905
  • 6
  • 45
  • 76