Reputation: 275
I have a query like below
(|(distinguishedName=cn=Game_BI_CHARGE_BACK,ou=Groups,ou=FC,dc=na,dc=company,dc=com)(distinguishedName=cn=Game_BI_Compliance,ou=Groups,ou=FC,dc=na,dc=company,dc=com)(distinguishedName=cn=Game_BI_Finance,ou=Groups,ou=FC,dc=na,dc=company,dc=com)(distinguishedName=cn=Game_BI_GP,ou=Groups,ou=FC,dc=na,dc=company,dc=com)(distinguishedName=cn=Game_BI_MANAGED_CARE,ou=Groups,ou=FC,dc=na,dc=company,dc=com)(distinguishedName=cn=Game_BI_MEDICAID,ou=Groups,ou=FC,dc=na,dc=company,dc=com)(distinguishedName=cn=Game_BI_PowerUser,ou=Groups,ou=FC,dc=na,dc=company,dc=com)(distinguishedName=cn=Game_BI_TRADE,ou=Groups,ou=FC,dc=na,dc=company,dc=com)(distinguishedName=cn=Game_BI_TRICARE,ou=Groups,ou=FC,dc=na,dc=company,dc=com))
I want to shorten it using wildcard, All the group names start with Game_BI. The above query works, I just want to make it short.
Thanks Shashi
Upvotes: 3
Views: 23135
Reputation: 3819
You cannot use the wildcard *
character to filter the distinguishedName
attribute - only exact matches will work. You can read more about that here, under the LDAP Clauses section :
However, according to your current filter, you could do a wildcard search by canonical name, or cn
, and get the same result :
(&(objectClass=group)(cn=Game_BI*))
That says, "Give me all the groups that have a canonical name that begins with "Game_BI".
Upvotes: 6