Skip to content
SDI-Docs

Filtering LDAP Server

Tasks

All users with a uid attribute value starting with the letter “b”
Search Base: dc=betrayer,dc=com
Filter: (&(uid=b*)(objectClass=inetOrgPerson))

first-b-result

All entries with either a defined uid attribute or a ou attribute starting with letter “d”
Search Base: dc=betrayer,dc=com
Filter: (|(uid=*)(ou=d*))

result2

All users entries within the whole DIT having a gidNumber value of 100
Search Base: dc=betrayer,dc=com
Filter: (&(gidNumber=100)(objectClass=inetOrgPerson))

result3

All user entries belonging to the billing department having a uidNumber value greater than 1023.
Search Base: ou=financial,ou=departments,dc=betrayer,dc=com
Filter: (&(uidNumber>=1023)(objectClass=inetOrgPerson))

result4

All user entries within the whole DIT having a commonName containing the substring “er”
Search Base: dc=betrayer,dc=com
Filter: (&(objectClass=inetOrgPerson)(cn=*er*))

result5

All user entries within the whole DIT belonging to gidNumber == 100 or having a uid value starting with letter “m”
Search Base: dc=betrayer,dc=com
Filter: (&(objectClass=inetOrgPerson)(gidNumber=100)(uid=m*))

result6