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 what it says: The attribute type 'dn' in your
modification list is not known in the server's subschema.
=> So remove ('dn', 'cn=A name,ou=People,dc=unipex,dc=it') from your mod
list.
> 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!
LDIF is something completely different. Also note that module ldif
treats the entry's DN as a different argument, not as normal attribute.
Ciao, Michael.
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev