~ttx/openldap/lucid-gssapi-495418

« back to all changes in this revision

Viewing changes to doc/man/man1/ldapsearch.1

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek, Updated debconf translations
  • Date: 2009-07-28 10:17:15 UTC
  • mfrom: (1.1.4 upstream) (0.2.2 sid)
  • mto: (0.2.4 sid)
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: james.westby@ubuntu.com-20090728101715-epwmqmsk0d3h22k3
* New upstream version.
  - Fixes FTBFS on ia64 with -fPIE. Closes: #524770.
  - Fixes some TLS issues with GnuTLS.  Closes: #505191.
* Update priority of libldap-2.4-2 to match the archive override.
* Add the missing ldapexop and ldapurl tools to ldap-utils, as well as the
  ldapurl(1) manpage.  Thanks to Peter Marschall for the patch.
  Closes: #496749.
* Bump build-dependency on debhelper to 6 instead of 5, since that's
  what we're using.  Closes: #498116.
* Set the default SLAPD_SERVICES to ldap:/// ldapi:///, instead of using
  the built-in default of ldap:/// only.
* Build-depend on libltdl-dev | libltdl3-dev (>= 1.4.3), for the package
  name change.  Closes: #522965.

[ Updated debconf translations ]
* Spanish, thanks to Francisco Javier Cuadrado <fcocuadrado@gmail.com>.
  Closes: #521804.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
.TH LDAPSEARCH 1 "RELEASEDATE" "OpenLDAP LDVERSION"
2
 
.\" $OpenLDAP: pkg/ldap/doc/man/man1/ldapsearch.1,v 1.59.2.5 2008/02/11 23:26:39 kurt Exp $
3
 
.\" Copyright 1998-2008 The OpenLDAP Foundation All Rights Reserved.
 
2
.\" $OpenLDAP: pkg/ldap/doc/man/man1/ldapsearch.1,v 1.59.2.10 2009/06/03 01:41:52 quanah Exp $
 
3
.\" Copyright 1998-2009 The OpenLDAP Foundation All Rights Reserved.
4
4
.\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
5
5
.SH NAME
6
6
ldapsearch \- LDAP search tool
15
15
[\c
16
16
.BR \-v ]
17
17
[\c
18
 
.BR \-t[t] ]
 
18
.BR \-t [ t ]]
19
19
[\c
20
20
.BI \-T \ path\fR]
21
21
[\c
23
23
[\c
24
24
.BR \-A ]
25
25
[\c
26
 
.BR \-L[L[L]] ]
 
26
.BR \-L [ L [ L ]]]
27
27
[\c
28
 
.BR \-M[M] ]
 
28
.BR \-M [ M ]]
29
29
[\c
30
30
.BI \-S \ attribute\fR]
31
31
[\c
51
51
[\c
52
52
.BI \-b \ searchbase\fR]
53
53
[\c
54
 
.BI \-s \ base\fR\||\|\fIone\fR\||\|\fIsub\fR\||\|\fIchildren\fR]
55
 
[\c
56
 
.BI \-a \ never\fR\||\|\fIalways\fR\||\|\fIsearch\fR\||\|\fIfind\fR]
57
 
[\c
58
 
.BI \-P \ 2\fR\||\|\fI3\fR]
59
 
[\c
60
 
.BR \-e \ [!]ext[=extparam]]
61
 
[\c
62
 
.BR \-E \ [!]ext[=extparam]]
 
54
.BR \-s \ { base \||\| one \||\| sub \||\| children }]
 
55
[\c
 
56
.BR \-a \ { never \||\| always \||\| search \||\| find }]
 
57
[\c
 
58
.BR \-P \ { 2 \||\| 3 }]
 
59
[\c
 
60
.BR \-e \ [ ! ] \fIext\fP [ =\fIextparam\fP ]]
 
61
[\c
 
62
.BR \-E \ [ ! ] \fIext\fP [ =\fIextparam\fP ]]
63
63
[\c
64
64
.BI \-l \ timelimit\fR]
65
65
[\c
66
66
.BI \-z \ sizelimit\fR]
67
67
[\c
68
 
.BR \-O \ security-properties ]
 
68
.BI \-O \ security-properties\fR]
69
69
[\c
70
70
.BR \-I ]
71
71
[\c
79
79
[\c
80
80
.BI \-Y \ mech\fR]
81
81
[\c
82
 
.BR \-Z[Z] ]
 
82
.BR \-Z [ Z ]]
83
83
.I filter
84
84
[\c
85
85
.IR attrs... ]
102
102
returned.  If + is listed, all operational attributes are returned.
103
103
If no \fIattrs\fP are listed, all user attributes are returned.  If only
104
104
1.1 is listed, no attributes will be returned.
 
105
.LP
 
106
The search results are displayed using an extended version of LDIF.
 
107
Option \fI\-L\fP controls the format of the output.
105
108
.SH OPTIONS
106
109
.TP
107
110
.B \-n
120
123
.B \-v
121
124
Run in verbose mode, with many diagnostics written to standard output.
122
125
.TP
123
 
.B \-t[t]
124
 
A single -t writes retrieved non-printable values to a set of temporary
 
126
.BR \-t [ t ]
 
127
A single \fB\-t\fP writes retrieved non-printable values to a set of temporary
125
128
files.  This is useful for dealing with values containing non-character
126
 
data such as jpegPhoto or audio. A second -t writes all retrieved values to
 
129
data such as jpegPhoto or audio. A second \fB\-t\fP writes all retrieved values to
127
130
files.
128
131
.TP
129
132
.BI \-T \ path
130
133
Write temporary files to directory specified by \fIpath\fP (default:
131
 
/var/tmp/)
 
134
\fB/var/tmp/\fP)
132
135
.TP
133
136
.BI \-F \ prefix
134
 
URL prefix for temporary files.  Default is file://\fIpath\fP/ where
135
 
\fIpath\fP is /var/tmp/ or specified with -T.
 
137
URL prefix for temporary files.  Default is \fBfile://\fIpath\fP where
 
138
\fIpath\fP is \fB/var/tmp/\fP or specified with \fB\-T\fP.
136
139
.TP
137
140
.B \-A
138
141
Retrieve attributes only (no values).  This is useful when you just want to
142
145
.B \-L
143
146
Search results are display in LDAP Data Interchange Format detailed in
144
147
.BR ldif (5).
145
 
A single -L restricts the output to LDIFv1.
146
 
A second -L disables comments.
147
 
A third -L disables printing of the LDIF version.
 
148
A single \fB\-L\fP restricts the output to LDIFv1.
 
149
 A second \fB\-L\fP disables comments.
 
150
A third \fB\-L\fP disables printing of the LDIF version.
148
151
The default is to use an extended version of LDIF.
149
152
.TP
150
 
.B \-M[M]
 
153
.BR \-M [ M ]
151
154
Enable manage DSA IT control.
152
155
.B \-MM
153
156
makes control critical.
159
162
.BR ldap_sort (3)
160
163
for more details. Note that
161
164
.B ldapsearch
162
 
normally prints out entries as it receives them. The use of the
163
 
.B \-S
 
165
normally prints out entries as it receives them. The use of the \fB\-S\fP
164
166
option defeats this behavior, causing all entries to be retrieved,
165
167
then sorted, then printed.
166
168
.TP
178
180
Where it is desired that the search filter include a \fB%\fP character,
179
181
the character should be encoded as \fB\\25\fP (see RFC 4515).
180
182
If \fIfile\fP is a single
181
 
\fI-\fP character, then the lines are read from standard input.
 
183
\fB\-\fP character, then the lines are read from standard input.
182
184
.B ldapsearch
183
185
will exit when the first non-successful search result is returned,
184
 
unless -c is used.
 
186
unless \fB\-c\fP is used.
185
187
.TP
186
188
.B \-x 
187
189
Use simple authentication instead of SASL.
188
190
.TP
189
191
.BI \-D \ binddn
190
192
Use the Distinguished Name \fIbinddn\fP to bind to the LDAP directory.
 
193
For SASL binds, the server is expected to ignore this value.
191
194
.TP
192
195
.B \-W
193
196
Prompt for simple authentication.
212
215
.TP
213
216
.BI \-h \ ldaphost
214
217
Specify an alternate host on which the ldap server is running.
215
 
Deprecated in favor of -H.
 
218
Deprecated in favor of \fB\-H\fP.
216
219
.TP
217
220
.BI \-p \ ldapport
218
221
Specify an alternate TCP port where the ldap server is listening.
219
 
Deprecated in favor of -H.
 
222
Deprecated in favor of \fB\-H\fP.
220
223
.TP
221
224
.BI \-b \ searchbase
222
225
Use \fIsearchbase\fP as the starting point for the search instead of
223
226
the default.
224
227
.TP
225
 
.BI \-s \ base\fR\||\|\fIone\fR\||\|\fIsub\fR\||\|\fIchildren
 
228
.BR \-s \ { base \||\| one \||\| sub \||\| children }
226
229
Specify the scope of the search to be one of
227
 
.IR base ,
228
 
.IR one ,
229
 
.IR sub ,
 
230
.BR base ,
 
231
.BR one ,
 
232
.BR sub ,
230
233
or
231
 
.I children
 
234
.B children
232
235
to specify a base object, one-level, subtree, or children search.
233
236
The default is
234
 
.IR sub .
 
237
.BR sub .
235
238
Note:
236
239
.I children
237
240
scope requires LDAPv3 subordinate feature extension.
238
241
.TP
239
 
.BI \-a \ never\fR\||\|\fIalways\fR\||\|\fIsearch\fR\||\|\fIfind
 
242
.BR \-a \ { never \||\| always \||\| search \||\| find }
240
243
Specify how aliases dereferencing is done.  Should be one of
241
 
.IR never ,
242
 
.IR always ,
243
 
.IR search ,
 
244
.BR never ,
 
245
.BR always ,
 
246
.BR search ,
244
247
or
245
 
.I find
 
248
.B find
246
249
to specify that aliases are never dereferenced, always dereferenced,
247
250
dereferenced when searching, or dereferenced only when locating the
248
251
base object for the search.  The default is to never dereference aliases.
249
252
.TP
250
 
.BI \-P \ 2\fR\||\|\fI3
 
253
.BR \-P \ { 2 \||\| 3 }
251
254
Specify the LDAP protocol version to use.
252
255
.TP
253
 
.B \-e \fI[!]ext[=extparam]\fP
 
256
.BR \-e \ [ ! ] \fIext\fP [ =\fIextparam\fP ]
254
257
.TP
255
 
.B \-E \fI[!]ext[=extparam]\fP
 
258
.BR \-E \ [ ! ] \fIext\fP [ =\fIextparam\fP ]
256
259
 
257
 
Specify general extensions with -e and search extensions with -E.
258
 
\'!\' indicates criticality.
 
260
Specify general extensions with \fB\-e\fP and search extensions with \fB\-E\fP.
 
261
\'\fB!\fP\' indicates criticality.
259
262
 
260
263
General extensions:
261
264
.nf
274
277
  [!]domainScope                               (domain scope)
275
278
  [!]mv=<filter>                               (matched values filter)
276
279
  [!]pr=<size>[/prompt|noprompt]       (paged results/prompt)
 
280
  [!]sss=[\-]<attr[:OID]>[/[\-]<attr[:OID]>...]  (server side sorting)
277
281
  [!]subentries[=true|false]           (subentries)
278
282
  [!]sync=ro[/<cookie>]                        (LDAP Sync refreshOnly)
279
283
          rp[/<cookie>][/<slimit>]     (LDAP Sync refreshAndPersist)
327
331
Specify the requested authorization ID for SASL bind.
328
332
.I authzid
329
333
must be one of the following formats:
330
 
.B dn:\c
331
 
.I <distinguished name>
 
334
.BI dn: "<distinguished name>"
332
335
or
333
 
.B u:\c
334
 
.I <username>
 
336
.BI u: <username>
335
337
.TP
336
338
.BI \-Y \ mech
337
339
Specify the SASL mechanism to be used for authentication. If it's not
338
340
specified, the program will choose the best mechanism the server knows.
339
341
.TP
340
 
.B \-Z[Z]
 
342
.BR \-Z [ Z ]
341
343
Issue StartTLS (Transport Layer Security) extended operation. If you use
342
 
.B \-ZZ\c
343
 
, the command will require the operation to be successful.
 
344
\fB\-ZZ\fP, the command will require the operation to be successful.
344
345
.SH OUTPUT FORMAT
345
346
If one or more entries are found, each entry is written to standard
346
347
output in LDAP Data Interchange Format or
359
360
    ...
360
361
.fi
361
362
.LP
362
 
If the -t option is used, the URI of a temporary file
363
 
is used in place of the actual value.  If the -A option
 
363
If the \fB\-t\fP option is used, the URI of a temporary file
 
364
is used in place of the actual value.  If the \fB\-A\fP option
364
365
is given, only the "attributename" part is written.
365
366
.SH EXAMPLE
366
367
The following command:
367
368
.LP
368
369
.nf
369
 
    ldapsearch -LLL "(sn=smith)" cn sn telephoneNumber
 
370
    ldapsearch \-LLL "(sn=smith)" cn sn telephoneNumber
370
371
.fi
371
372
.LP
372
373
will perform a subtree search (using the default search base and
382
383
    cn: John Smith
383
384
    cn: John T. Smith
384
385
    sn: Smith
385
 
    sn;lang-en: Smith
386
 
    sn;lang-de: Schmidt
387
 
    telephoneNumber: 1 555 123-4567
 
386
    sn;lang\-en: Smith
 
387
    sn;lang\-de: Schmidt
 
388
    telephoneNumber: 1 555 123\-4567
388
389
 
389
390
    dn: uid=sss,dc=example,dc=com
390
391
    cn: Steve Smith
391
392
    cn: Steve S. Smith
392
393
    sn: Smith
393
 
    sn;lang-en: Smith
394
 
    sn;lang-de: Schmidt
395
 
    telephoneNumber: 1 555 765-4321
 
394
    sn;lang\-en: Smith
 
395
    sn;lang\-de: Schmidt
 
396
    telephoneNumber: 1 555 765\-4321
396
397
.fi
397
398
.LP
398
399
The command:
399
400
.LP
400
401
.nf
401
 
    ldapsearch -LLL -u -t "(uid=xyz)" jpegPhoto audio
 
402
    ldapsearch \-LLL \-u \-t "(uid=xyz)" jpegPhoto audio
402
403
.fi
403
404
.LP
404
405
will perform a subtree search using the default search base for entries
411
412
.nf
412
413
    dn: uid=xyz,dc=example,dc=com
413
414
    ufn: xyz, example, com
414
 
    audio:< file:///tmp/ldapsearch-audio-a19924
415
 
    jpegPhoto:< file:///tmp/ldapsearch-jpegPhoto-a19924
 
415
    audio:< file:///tmp/ldapsearch\-audio\-a19924
 
416
    jpegPhoto:< file:///tmp/ldapsearch\-jpegPhoto\-a19924
416
417
.fi
417
418
.LP
418
419
This command:
419
420
.LP
420
421
.nf
421
 
    ldapsearch -LLL -s one -b "c=US" "(o=University*)" o description
 
422
    ldapsearch \-LLL \-s one \-b "c=US" "(o=University*)" o description
422
423
.fi
423
424
.LP
424
425
will perform a one-level search at the c=US level for all entries
441
442
    o: University of Colorado at Denver
442
443
    o: UCD
443
444
    o: CU/Denver
444
 
    o: CU-Denver
 
445
    o: CU\-Denver
445
446
    description: Institute for Higher Learning and Research
446
447
 
447
448
    dn: o=University of Florida,c=US