Problem on add
Ron Teitelbaum
Ron at USMedRec.com
Sun Jun 8 19:30:39 CEST 2008
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: python-ldap-dev-bounces at lists.sourceforge.net [mailto:python-ldap-
> dev-bounces at lists.sourceforge.net] On Behalf Of Michele Petrazzo - Unipex
> srl
> Sent: Saturday, June 07, 2008 3:09 AM
> To: python-ldap-dev at 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 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',
> 'organizationalPerson', 'mozillaOrgPerson']), ('sn', 'A name'), ('mail',
> 'a_real at mail.it'), ('givenName', 'Michele')]
>
>
> l.add_s(LDAP_BASE_DN, ldif)
>
> And I receive:
>
> ldap.UNDEFINED_TYPE: {'info': 'dn: attribute type undefined', 'desc':
> 'Undefined attribute type'}
> d
>
>
> But if I save the same data into a ldif file and add it with:
> ldapadd -xv -D "cn=admin,dc=unipex,dc=it" -f test_entry.ldif -W
>
> it works!
>
> What can I try or where look for solve it?
>
> Thanks,
> Michele
>
> P.s. I trying to add an ldif data into ldap with mozilla scheme
>
>
>
More information about the python-ldap
mailing list