LDAP: objectcategory versus objectclass
When performing LDAP searches using scripts or LDAP capable tools, you are usually looking for user, group or computer objects. Default queries include the objectClass to distinguish between these types.
A better method however is using objectCategory since that attribute is indexed, whereas objectClass isn’t. Example searches:
- (&(objectCategory=person)(sAMAccountName=*smith*))
- (&(objectCategory=group)(cn=GG_APP*))
- (&(objectCategory=computer)(cn=WSXP*))