Skip to Main Content

Security Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Ldap create user with custom attributes and objectclasses

2940488Jun 30 2015 — edited Jul 20 2015

I am trying to add custom attributes and object classes in my LDAP(ODSEE) but having issues.

Initially, I had issues with adding the custom attributes and classes, but was finally it worked. My custom definitions look like below(got the test code from one of the sites for testing)

dn: cn=schema

changetype: modify

add: attributeTypes

attributeTypes: ( 1.3.6.1.4.1.4203.666.1.90

NAME ( 'personStatus' )

DESC 'person Status'

SYNTAX 1.3.6.1.4.1.1466.115.121.1.15

MULTI-VALUE )

dn: cn=schema

changetype: modify

add: objectClasses

objectClasses: ( 1.3.6.1.4.1.4203.666.1.100

  NAME 'YoLinuxPerson'

  DESC 'Yo Linux Person’

  SUP inetOrgPerson

  AUXILIARY

  MAY personStatus )

My user ldif is as below

dn: uid=acc, ou=People, dc=example,dc=com

**objectClass: YoLinuxPerson*******************Custom

objectClass: organizationalPerson

objectClass: person

objectClass: top

cn: aaaaa Vaughan

sn: Vaughan

facsimileTelephoneNumber: +1 408 555 3372

givenName: Kirsten

l: Sunnyvale

mail: aaaaa@example.com

ou: Human Resources

ou: People

roomNumber: 2871

telephoneNumber: +1 408 555 5625

uid: aaaaa

**personStatus: abcdefghij**********************Custom

userPassword:: e1NTSEF9WhgljhlWxzZUdDUVVFUW05OTg1bmJSUkpoNHdYUVgrZkE9P

I tried multiple ways but everything fails. If I remove the "personStatus: abcdefghij" the ldapadd command works, but if I have it there, it fails saying

[config]$ ldapadd -h  -p -D "cn=" -w -f User.ldif

adding new entry uid=acc, ou=People, dc=example,dc=com

ldap_add: Object class violation

I also did a ldap search

- ldapsearch -D -w -h  -p -b "cn=schema" -s base 'objectclass=*'

and it displayed all the results including the custom attribute (which I am having issues with), but i could not see the custom objectClass(which I can add to the user).

I tried with Apache Studio also, it fails with the same message. I am not sure what I am missing. Any help is appreciated. Thanks.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 17 2015
Added on Jun 30 2015
1 comment
1,327 views