From: Michele P. - U. s. <mic...@un...> - 2008-06-07 07:08:49
|
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_...@ma...'), ('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 |