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

Re: serach using multiple options



Tony,

It looks like your second argument is being interpretted
as an attribute to return (which does not exist).   When
searching on two or more parameters you need to specify
a proper search filter.  In your example you probably want
to AND the givenname and surname, for which the command
would be:

ldapsearch -L -b "dc=pokuscca,dc=cz" "(&(givenName=Antonin)(sn=Novak))"

Antonin Novak wrote:
> 
> I am looking to create a web page to allow my users to search the
> LDAP database using manually input params.
> 
> If I only use 1 parameter eg. givenName=Antonin- I get back the full
> details of my record.
> 
> If I use 2 parameters eg. givenName=Antonin  sn=Novak - I only
> get back the dn line.
> 
> My ldapsearch command line is
> ldapsearch -L -b "dc=pokuscca,dc=cz" givenName=Antonin
> sn=Novak
> 
> Am I trying to do too much, or have I done something wrong when
> inputting my command line.
> 
> Thanks for any help
> 
> Tony
> 
> ----------------------------------------------------------------
> 
>   Antonin Ch. Novak                    mailto:Antonin.Novak@cca.cz
>   Systemovy administrator
>   Systemova a technicka podpora
> 
>    Tel: +42 019 7221253
>   Fax: +42 019 7222931
> 
>   CCA spol. s r.o.                    Web: http://www.cca.cz
>   Kratka 8, 301 17 Plzen
>   Czech Republic

-- 
Tim Peterman - Unix & Web Server Administration
Lockheed Martin NE&SS-M/EIS, Moorestown, NJ