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',
'[EMAIL PROTECTED]'), ('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


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev

Reply via email to