I am trying to validate if there is one user at least under specific domain using ldap search.
I used this filter, but do not have any match:
dc=example,dc=com sub (&(objectClass=user)(!(UserAccountControl:1.2.840.113556.1.4.803:=2))
(sAMAccountName=*))
once I try this, it has a match:
dc=example,dc=com sub (&(objectClass=user)(!(UserAccountControl:1.2.840.113556.1.4.803:=2))
(sAMAccountName=Admini*))
Can you help me on this please.