pythonldapldap3

I want to search the uidNumber from range 7000 to 8000. How can I do that in LDAP3?


I want to search the uidNumber from range 7000 to 8000. How can I do that in LDAP3? Is it possible to search in range in ldap ?

 conn.search('o=csun', '(&(objectclass=person)(uidnumber>=7000))', attributes=['uidNumber'])

Solution

  • Yes, it's possible to express a range in the filter (&(uidNumber>=7000)(uidNumber<=8000)).