OpenLDAP how to create and use an objectclass that is a child of inetOrgPerson

I'm trying to create an LDAP based address book. For each recipient/user in it, I will need to store information about their contact points. Information will include:
contact type - phone/email/fax/pager/etc.
label - grandma's attic, work, home, etc.
address - actual phone number/email/etc.
and few other properties

I've figured out by now that there is nothing out of box that can handle this, but that I can create my own ContactPoint ObjectClass, make it a structural class and have it be a child of inetOrgPerson. but I still can't seem to wrap my head around how this all comes together. For example, how would I query for a person and his/her contact points?


Make it an inetOrgPerson and an extensibleObject . Then you can use any attribute from anywhere in it. I would steer well clear of defining your own object classes.


LDAP is designed to be extensible and defining new schema elements is often required. When clients cannot find an attribute with the syntax and name they desire, they should define a new attribute with an appropriate object class. Designers should:

  • know the existing schema elements
  • use existing schema elements where possible
  • not use vendor-specific attributes, this results in poor quality, brittle systems. Use only attributes and object classes from schemas defined by the standards body (unless of course you roll your own)
  • inherit from an existing object class instead of defining a new object class
  • use matching rules (from the attribute type definition) for comparisons and not use language equality constructs.
  • avoid the extensibleObject unless absolutely required. Using extensibleObject is a last resort option and is similar to using an untyped programming language and results in poor quality, brittle, difficult to maintain systems
  • For more information, please see "LDAP: Programming Practices"

    链接地址: http://www.djcxy.com/p/60884.html

    上一篇: 搜索PHP

    下一篇: OpenLDAP如何创建和使用inetOrgPerson的子对象类