Re: Problem on add

2008-06-09 Thread Michele Petrazzo - Unipex srl
Michele Petrazzo - Unipex srl wrote: <-cut-> Hi, thanks to all for the quickly reply. It was that it's the first time that I try to use ldap ;) and that like Bjørn says, "The DN is not a part of the ldif when using the API. " Remove that, now it's all working! Michele --

RE: Problem on add

2008-06-09 Thread Ron Teitelbaum
Hi Michele, Have a look at this http://www.grotan.com/ldap/python-ldap-samples.html I thought it was pretty helpful. It's easier to build the ldif using the modlist. Ron > -Original Message- > From: [EMAIL PROTECTED] [mailto:python-ldap- > [EMAIL PROTECTED] On Behalf Of Michele Petrazzo

Re: Problem on add

2008-06-09 Thread Michael Ströder
Michele Petrazzo - Unipex srl wrote: > > ldif = [('dn', 'cn=A name,ou=People,dc=unipex,dc=it'), I think this variable is misnamed. > [..] > l.add_s(LDAP_BASE_DN, ldif) > [..] > ldap.UNDEFINED_TYPE: {'info': 'dn: attribute type undefined', 'desc': > 'Undefined attribute type'} It means exactly w

Re: Problem on add

2008-06-09 Thread Michele Petrazzo - Unipex srl
Bjørn Ove Grøtan wrote: > You misunderstood somehow. The DN is not a part of the ldif when > using the API. Hi, I forgot to say that it's the also the first time that I try to use ldap ;) Now it's working! > See below sample. I also suggest using the modlist-module for > automating the list-gene