Apache DS ignores attrsonly

Thorsten Kampe thorsten at thorstenkampe.de
Mon Jul 13 11:07:53 CEST 2009


[Python 2.6.2, python-ldap 2.3.8, Apache DS 1.5.4]

Hi,

not sure whether this is an Apache DS or Python-LDAP bug: Apache DS 
replies with values although I specifically request it not to:

[1]>>> import ldap
[2]>>> connection = ldap.initialize('ldap://')
[3]>>> connection.simple_bind_s('uid=admin,ou=system', 'secret')
[3]    (97, [])
[4]>>> connection.search_s('ou=system', ldap.SCOPE_SUBTREE, 
filterstr='(cn=*)', attrlist = ['cn'], attrsonly = True)
[4]
[('uid=admin,ou=system', {'cn': ['system administrator']}),
 ('cn=Administrators,ou=groups,ou=system', {'cn': ['Administrators']})]

But:
~/.ldaprc
BASE    ou=system
BINDDN  uid=admin,ou=system
URI     ldap://

thorsten at tkampe[~]> ldapsearch -x -w secret -LLL -A "(cn=*)" cn
dn: uid=admin,ou=system
cn:

dn: cn=Administrators,ou=groups,ou=system
cn:

The same query works (does not return values) if I query an Active 
Directory or eDirectory server.


Thorsten





More information about the python-ldap mailing list