Problem on add

Michael Ströder michael at stroeder.com
Sat Jun 7 10:10:20 CEST 2008


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.



More information about the python-ldap mailing list