views:

18

answers:

1

I am trying to find LDAP objects which don't have any value in their "manager" property. What should be the filter string? I am trying with this to no avail:

"(&(objectClass=user)(objectCategory=person)(manager=NULL))"
+1  A: 

Try this:

(&(objectClass=user)(objectCategory=person)(!(manager=*)))

! is the "not" operator and * is the LDAP wildcard so the above will do a search for any entry that doesn't have a value set for the manager-attribute.

Per Noalt