Python loves LDAP again....
Michael Ströder
michael at stroeder.com
Tue Oct 17 10:56:46 EDT 2000
> Jørgen Teunis wrote:
>
> l.add_s("o=bos, c=nl",[("objectclass","person"),
> ("sn","Belletje"), ("cn","Pietje bel")])
Note: LDAP attributes can be multi-valued. Therefore it should be
l.add_s("o=bos,
c=nl",[("objectclass",["person"]),("sn",["Belletje"]),
("cn",["Pietje bel"])])
> ldap.ALREADY_EXISTS: {'desc': 'Already exists'}
There seems to be an existing entry with DN "o=bos, c=nl". That's
what your LDAP server is telling you.
> So, after reading this. you would think that i allready have a
> person named Pietje bel, but that's not true.
How do you check that there isn't such an entry?
> You might also want to say: check you're SCHEME
No, this has nothing to do with your schema. If the schema is wrong
you would probably get ldap.OBJECT_CLASS_VIOLATION. Read the docs.
Ciao, Michael.
More information about the Python-list
mailing list