Brett
Brett

Reputation: 6020

Unable to add an attribute to an entry in OpenDJ LDAP

I am trying to add an attribute to a custom objectclass in OpenDJ, but am getting a reference error. I have checked the schema and can't see any reason why I shouldn't be able to add. Here is what I am trying to add:

dn: o=@!aaaa.bbbb.cccc.dddd!0001!eeee.ffff,o=myorg
objectClass: top
objectClass: myOrganization
managerGroup: inum=@!aaaa.bbbb.cccc.dddd!0001!eeee.ffff!0003!5555,ou=groups,o=@!aaaa.bbbb.cccc.dddd!0001!eeee.ffff,o=myorg
o=@!aaaa.bbbb.cccc.dddd!0001!eeee.ffff

When I try add it, I get the following (with long inums replaced with ... for simplicty of this quote):

The DN "inum=...,ou=groups,o=...,o=myorg" could not be parsed due to the following reason: No attribute type with name or OID "inum" exists in the schema.

However, I can add an inum attribute to the the object (e.g. if I create the object without a managerGroup attribute, so inum is a known attribute. Here's the LDIF (in config/schema/101-myorg.ldif):

attributeTypes: ( 1.3.6.1.4.1.48710.1.3.117 NAME 'inum'
  DESC 'XRI i-number'
  EQUALITY caseIgnoreMatch
  SUBSTR caseIgnoreSubstringsMatch
  SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
  X-ORIGIN 'internal attribute' )
objectClasses: ( 1.3.6.1.4.1.48710.1.4.4 NAME 'myOrganization'
  SUP ( top )
  STRUCTURAL
  MUST ( objectclass )
  MAY ( c $ county $ description $ ... $ inum $ managerGroup $ ... $ o $  ... )

I am able to add an entry with objectClass myOrganization and a managerGroup set to ou=groups....,o=myorg which adds fine. If I modify the entry to include an inum in the value, I get the error.

I have another install (that was run by a 3rd party installer script) which works fine with adding the entry, and I have compared the full schema across both installs, but cannot see any differences in the 2 installs. Yet behaviour changes. Is there anything I am overlooking? How can I resolve this to add the entry?

Upvotes: 0

Views: 608

Answers (1)

Benighted
Benighted

Reputation: 11

I wonder if this could be an issue with schema order, I had an issue in the past where I had added an attribute to an objectclass in one of the original schema files (say 01-config.ldif) but the attribute was defined in 99-user.ldif, I saw an error on startup saying the attribute did not exist, all because it needed to be loaded first.

Upvotes: 1

Related Questions