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
alf Of Michele Petrazzo - Unipex > srl > Sent: Saturday, June 07, 2008 3:09 AM > To: python-ldap-dev@lists.sourceforge.net > Subject: Problem on add > > Hi list, > I'm trying, for the first time, to use python-ldap and I find some > problems on add. I have a code that are, more

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

Problem on add

2008-06-07 Thread Michele Petrazzo - Unipex srl
Hi list, I'm trying, for the first time, to use python-ldap and I find some problems on add. I have a code that are, more or less: LDAP_BASE_DN = "dc=unipex,dc=it" ldif = [('dn', 'cn=A name,ou=People,dc=unipex,dc=it'), ('cn', 'A name'), ('objectclass', ['top', 'person', 'inetOrgPerson', 'organiza