dn:cn=Jim Bob,ou=people,dc=example,dc=com objectclass: top objectclass: person objectclass: organizationalPerson objectclass: inetOrgPerson cn: Jim Bob sn: Bob mail: email@example.com ou: sales ....
The objectclass definition includes any objectclass hierarchy (its SUPerior objectcClass). All the schemas, which contain ALL the objectclasses in the hierarchy, must be visible to the LDAP server (in OpenLDAP using the include directives of slapd.conf). The LDAP server can, in theory, figure the hierarchy stuff out itself and certainly a lot faster that you can type it. The above definition can also confuse by apparently having more than one STRUCTURAL Objectclass in an entry - see additional notes on ObjectClass Inheritance.
In practice OpenLDAP 2.x+ version can process the objectclass hierarchy so either the LDIF above or the following LDIF fragment works perfectly including being able to access both objectclasses and attributes that are contained in the SUPerior hierarchy, for instance you can access street which is an attribute of organizationalPerson:
dn:cn=Jim Bob,ou=people,dc=example,dc=com objectclass: inetOrgPerson cn: Jim Bob sn: Bob mail: firstname.lastname@example.org ou: sales ....
Caution: If you export the above definition from OpenLDAP it will return precisely what you defined in the original LDIF that created the entries. Not all LDAP servers will process the object hierarchy automatically. If you then try to load this exported LDIF into a non-hierarchy processing LDAP server it may not produce the desired results. If you use only LDAP severs that support hierarchical processing (for example only OpenLDAP) then you can save some typing, else...
Problems, comments, suggestions, corrections (including broken links) or something to add? Please take the time from a busy life to 'mail us' (at top of screen), the webmaster (below) or info-support at zytrax. You will have a warm inner glow for the rest of the day.
3 ldap objects
4 install ldap
7 replica & refer
10 ldap api
14 ldap tools
notes & info
rfc's & x.500
This work is licensed under a Creative Commons License.
If you are happy it's OK - but your browser is giving a less than optimal experience on our site. You could, at no charge, upgrade to a W3C STANDARDS COMPLIANT browser such as Firefox