how to add a whole entry?
Joao S. O. Bueno
gwidion at mpc.com.br
Thu Nov 27 16:14:57 CET 2003
Hi there,
Well, I am also learning it. But it is troubleless with the method
add_s in the ldap object,
Just do l.add_s (dn_string, [ (attribute_name, attribute_value),
(attribute_name), (attribute_value)]) , being carefull to include all
the mandatory attributes for each objectClass. BTW objectClass itself
is a mandatory attribute.
Check the error returned from the ldap (to learn, better, i usually do
these experiences in an interactive python shell), to see if any
attribute is missing.
On Thursday 27 November 2003 11:43, Lukas Meyer wrote:
> Hello,
>
> I want to add a whole entry to an ldap tree with python-ldap. But I
> don't get any good result. I can add, replace, delete entries
> without a problem and with the function delete_s() it's also
> possible to delete a whole entry. But how can i add/create any
> entry? I dont't want to add only an attribute. I.e. I want to add
> cn=Test Person, ou=Persons, dc=domain. I can't find anything about
> how to do that. Can anyone give me a hint for that?
>
> Best regards
>
> Lukas Meyer
>
>
>
>
More information about the python-ldap
mailing list