Archive for March, 2009

ldapsearch limit returned results

Problem You want to perform an ldap search but only receive a limited number of records in return. Solution Use -z # to restrict the number of records returned. Example Search and return only 5 records.ldapsearch -x -z 5 -v-D”cn=Manager,dc=demo,dc=net”-w secret \-b”dc=demo,dc=net” “(lastlogin>=99999999)” Reference Technorati Tags: , LDAP Training SchoolLDAP Docs – Quick Start Guide

ldapsearch greater than

Problem You want to search for a field greater than a value, in your LDAP search. Solution To search for a field with a value greater than a given figure, we use >=. If you try to just use > it chucks out an error. Example This is how to perform a greater than LDAP [...]