[Date Prev][Date Next] [Chronological] [Thread] [Top]

ldapsearch: Search for Operational Attributes using wildcards



 Hi there,

I don't understand what's happening here so hopefully someone can help me
with this.

I have a DIT that contains objects like this:

uid=test,ou=user,ou=sales,o=Testcompany

Now I want to find out all objects that have "sales" in their DN. Since DN
is not an attribute one can search for I used the the operational attribute
"entryDN":
    ldapsearch -x "(entryDN=*sales*)" cn
That search didn't find anything.

After that I tried
    ldapsearch -x "(entryDN=uid=test,ou=user,ou=sales,o=Testcompany)" cn
and got the expected result.

Now it seems that as soon as I use a wildcard in the filter argument the
search returns nothing.
Even
    ldapsearch -x "(entryDN=uid=test,ou=user,ou=sales,o=Testcompan*)" cn
returns nothing.

I've also tried things like
    ldapsearch -x "(entryDN:dnSubtreeMatch:=*sales*)" cn
which returned no result either.


Any ideas what I'm doing wrong? Any help would be greatly appreciated!

Cheers -- Markus