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

Re: ldapsearch '(dn=cn=John Doe,o=Foo Co.,c=US)' ??



I'm not sure, but I think that you sould think of it as concatenating
the search root and the criteria you give.
So using the second method it is like searching for "dn=cn=John
Doe,c=Foo Co.,o=US, c=Foo Co.,o=US"

Brett Lemoine wrote:
> 
> OK, I give.  How does one (or is it impossible to) get entries from a
> query useing ldapsearch given a 'dn'?
> 
> e.g.
> 
>         I know: 'dn=cn=John Doe,c=Foo Co.,o=US'
>         I want: telephonenumber.
> 
> Obviously, I can
>         ldapsearch -b "c=Foo Co.,o=US" "(cn=John Doe)" telephonenumber
> But why can't I
>         ldapsearch -b "c=Foo Co.,o=US" "(dn=cn=John Doe,c=Foo Co.,o=US)" \
>                 telephonenumber
> ?
> 
> Am I missing something?
> 
> bl
> --
> //====== Brett G. Lemoine -=- <bl@incyte.com> ===============================\\
> ||Sr. Systems Administrator|   "There are two major products that come out   ||
> ||Core Unix System Services|    of Berkeley:         LSD and UNIX.           ||
> || Incyte  Pharmaceuticals |    We don't believe this to be a coincidence."  ||
> ||  Palo Alto, California  |                          -- Jeremy S. Anderson  ||
> |+-------------------------+-------------------------------------------------+|
> \\== PGP Key Fingerprint: 68 A1 2A 2D 82 CE E9 70  5B 80 D1 11 EC F3 FB 85 ==//