How to find groups(CN) which contains specific words?

Zhang Huangbin zhbmaillistonly at
Wed Dec 15 01:32:45 CET 2010

On Nov 15, 2010, at 1:16 PM, Jahidul Hasan wrote:

> I need to find those groups name which contains the word "ABC", is it
> possible ?
> base_dn = 'CN=ABC,OU=Common,DC=test,DC=com'
> ldapConn.search_s(base_dn, ldap.SCOPE_SUBTREE)
> Can I use %ABC% ?

LDAP search filter can be wild-card, use '*ABC*' instead.


Zhang Huangbin

- Open Source Mail Server Solution for Red Hat(R) Enterprise Linux,
  CentOS, Debian, Ubuntu, OpenSuSE, FreeBSD:

More information about the python-ldap mailing list