bugs in ldap.OBJECT_CLASS_VIOLATION ?
Michael Ströder
michael at stroeder.com
Wed Jul 20 17:10:57 CEST 2005
Jérôme Wax wrote:
>
> ldap.OBJECT_CLASS_VIOLATION: {'info': "object class 'inetOrgPerson'
> requires attribute 'sn'", 'desc': 'Object class violation'}
Yepp.
> But sn is not a required attribute for inetOrgPerson...
It is required since inetOrgPerson is SUP organizationalPerson which is
SUP person.
> and inetOrgPerson schema response doesn't contain sn attribute...
You have to resolve object class inheritance.
Fortunately you can use ready-to-use methods:
ldap.schema.subentry.SubSchema.attribute_types()
Or the convenience wrapper method:
ldap.schema.models.Entry.attribute_types().
BTW: Attribute types are derived via SUP too...
Additionally I'd recommend to use the schema browser in
http://www.web2ldap.de to dig your local LDAP server's schema. :-)
Ciao, Michael.
More information about the python-ldap
mailing list