Set the base object to DN from which the search should return entries, set the scope to either SUB or ONE depending on where the base object is in relation to the entries desired, use a filter like '(!(employeeID=NE*))'
and a list of attributes to return from each entry. It's also a good practice to provide a size limit and time limit.
An example using ldapsearch
:
ldapsearch -h hostname -p port -b dc=abc,dc=com -s sub '(!(employeeID=NE*))' employeeID
which returns the employeeID from each entry below dc=abc,dc=com
where the employeeID does not match the filter. Also returns entries that have no employeeID at all, so the filter might need to be more restrictive, for example, '(&(employeeID=*)(!(employeeID=NE*)))'
.