(Answer) (Category) OpenLDAP Faq-O-Matic : (Category) Trash : (Answer) How do I define a new object class?
You can use the objectclass slapd.conf(5) configuration directive to extend the servers schema with new object classes.

For example, if you want to have your own person object class, you could add:

  objectclass myperson
     requires uid, cn, objectclass
     allows sn, givenname, mail
to your slapd.conf (or local schema file). This would create an object class myperson which required cn, sn, and objectclass attributes and allowed mail, phone, and fax attributes.
  % ldapadd -D <RootDN> -W <<EOF
  dn: cn=archie, dc=openldap, dc=org
  uid: archie
  cn: Archie Bunker
  givenname: Archie
  objectclass: myperson
  objectclass: top

  EOF

Be sure to add attribute definitions for any undefined attribute types.
[Append to This Answer]
This document is: http://www.openldap.org/faq/index.cgi?file=259
[Search] [Appearance]
This is a Faq-O-Matic 2.721.test.
© Copyright 1998-2013, OpenLDAP Foundation, info@OpenLDAP.org