Hi there,
Well, I am also learning it. But it is troubleless with the method=20
add_s in the ldap object,=20
Just do l.add_s (dn_string, [ (attribute_name, attribute_value),=20
(attribute_name), (attribute_value)]) , being carefull to include all=20
the mandatory attributes for each objectClass. BTW objectClass itself=20
is a mandatory attribute.
Check the error returned from the ldap (to learn, better, i usually do=20
these experiences in an interactive python shell), to see if any=20
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=3DTest Person, ou=3DPersons, dc=3Ddomain. I can't find anything about
> how to do that. Can anyone give me a hint for that?
>
> Best regards
>
> Lukas Meyer
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive? Does it
> help you create better code? SHARE THE LOVE, and help us help
> YOU! Click Here: http://sourceforge.net/donate/
> _______________________________________________
> Python-LDAP-dev mailing list
> Pyt...@li...
> https://lists.sourceforge.net/lists/listinfo/python-ldap-dev
=2D-=20
Este e-mail =E9, exceto pelas partes citadas
de outros e-mails, copyright(c) de Jo=E3o Sebasti=E3o
de Oliveira Bueno. Nenhuma c=F3pia deste e-mail ou=20
parte do mesmo pode existir nas depend=EAncias=20
de, ou em posse de funcion=E1rios, de associa=E7=F5es
protetoras de direitos autorais Brasileiras,
dos Estados Unidos da Am=E9rica, ou de outros
pa=EDses. Em particular essa exce=E7=E3o do direito
de leitura e posse deste e-mail se extende =E0
ABRA, ABPI, ABES, BSA, RIAA e MPAA. Violadores
est=E3o infringindo as leis internacionais de=20
direitos autorais e sujeitos =E0s penalidades cab=EDveis.
Voc=EA pode re-utilizar, emendar, acrescentar
suas palavras e citar e re-enviar qualquer=20
parte do mesmo, desde que essa nota seja=20
preservada e se n=E3o pertencer a alguma
das entidades supracitadas.
|