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

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



Try:

ldapsearch -b "cn=John Doe,c=Foo Co.,o=US" -s base "objectclass=*" telephonenumber

Neil Smith

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 ==//