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

resolved: search fails with spaces in search value



I'm not sure exactly what the issue is, but the problem is being cause by
some funky shell expansion of command line args.  I'd stuck an ldapsearch
command in a script like this:


     #!bin/sh
     ldapsearch <other args> $*

I'd then call this script with the ldap search filter as an argument.  As
such, I got the error that I described in my original posting (attached
below).  I've found, however, that if I use ldapsearch directly (not with
this script) then everything works fine!  I've not worked out exactly where
the problem is (something related to quoting), but I at least know that the
OpenLDAP side of things is working correctly.

Thanks to all who replied...

Charles

Charles Owens wrote:

> This is really bugging me.  It could be that I simply have missed
> something w.r.t. proper ldap searchstring syntax.  Hopefully someone can
> put me out of my misery.
>
> Consider this directory entry:
>
> dn: cn=Domain Admins, ou=Accounts, ou=ITS, dc=enc, dc=edu
> member: Administrator,1f4,1
> objectclass: sambaGroup
> ntuid: Domain Admins
> rid: 200
> cn: Domain Admins
>
> Give the proper search base, you'd think that I'd be able to locate this
> with this simple search string:
>
>      '(cn=Domain Admins)'
>
> Instead, I get this error message:
>
>      ldap_search: Bad search filter
>
> Uhhhh... okay... so, then I try this
>
>      '(cn=Domain*Admins)'
>
> Which works just fine!  I have a feeling I'm being a dummy here... any
> ideas?
>
> Thanks,
> ---
> -------------------------------------------------------------------------
>
>   Charles N. Owens                               Email:  owensc@enc.edu
>                                              http://www.enc.edu/~owensc
>   Network & Systems Administrator
>   Information Technology Services  "Outside of a dog, a book is a man's
>   Eastern Nazarene College         best friend.  Inside of a dog it's
>                                    too dark to read." - Groucho Marx
> -------------------------------------------------------------------------

--
---
-------------------------------------------------------------------------
  Charles N. Owens                               Email:  owensc@enc.edu
                                             http://www.enc.edu/~owensc
  Network & Systems Administrator
  Information Technology Services  "Outside of a dog, a book is a man's
  Eastern Nazarene College         best friend.  Inside of a dog it's
                                   too dark to read." - Groucho Marx
-------------------------------------------------------------------------