get or set OpenLDAPaci
Michael Ströder
michael at stroeder.com
Wed Jul 20 17:59:59 CEST 2005
Jérôme Wax wrote:
>
> Then I create an openexchange account on an ldap account,
Just curious, what project are you working on?
> mlist = ldap.modlist.modifyModlist(attrs, newattrs)
> self.l.modify_s(cn, mlist)
Can you please post repr(mlist)?
> attrs is the entire attributes list.
> newattrs is the modified list.
These are dictionaries, not lists!
> When I create and delete... it works.
>
> But if I recreate OX attributes... OpenLDAPaci already exist... but don't appear in attributes list and cause this:
>
> ldap.INAPPROPRIATE_MATCHING: {'info': 'modify/add: OpenLDAPaci: no equality matching rule', 'desc': 'Inappropriate matching'}
>
> How can I get OpenLDAPaci attribute to prevent this error ?
Probably you have to use ldap.MOD_REPLACE in mlist for attribute
OpenLDAPaci instead of ldap.MOD_DELETE. Not sure if usage of
ldap.modlist.modifyModlist() in every case.
But first turn on python-ldap's debugging by setting trace_level=2 when
calling ldap.initialize() and post the output.
Example:
l = ldap.initialize('ldap://localhost:1390',trace_level=2)
Ciao, Michael.
More information about the python-ldap
mailing list