~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): Mathias Gug, Steve Langasek, Mathias Gug
  • Date: 2009-07-30 16:42:58 UTC
  • mfrom: (0.2.4 sid)
  • Revision ID: james.westby@ubuntu.com-20090730164258-r282hhchgzytxm00
Tags: 2.4.17-1ubuntu1

[ Steve Langasek ]
* Fix up the lintian warnings:
  - add missing misc-depends on all packages
  - slapd, libldap-2.4-2-dbg sections changed to 'debug' to match archive
    overrides
  - bump Standards-Version to 3.8.2, no changes required.

[ Mathias Gug ]
* Resynchronise with Debian. Remaining changes:
  - AppArmor support:
    - debian/apparmor-profile: add AppArmor profile
    - updated debian/slapd.README.Debian for note on AppArmor
    - debian/slapd.dirs: add etc/apparmor.d/force-complain
    - debian/slapd.postrm: remove symlink in force-complain/ on purge
    - debian/rules: install apparmor profile.
  - Don't use local statement in config script as it fails if /bin/sh
    points to bash.
  - debian/slapd.postinst, debian/slapd.script-common: set correct
    ownership and permissions on /var/lib/ldap, /etc/ldap/slapd.d (group
    readable) and /var/run/slapd (world readable).
  - Enable nssoverlay:
    - debian/patches/nssov-build, debian/rules: Build and package the nss
      overlay.
    - debian/schema/misc.ldif: add ldif file for the misc schema which
      defines rfc822MailMember (required by the nss overlay).
  - debian/{control,rules}: enable PIE hardening
  - Use cn=config as the default configuration backend instead of
    slapd.conf. Migrate slapd.conf file to /etc/ldap/slapd.d/ on upgrade
    asking the end user to enter a new password to control the access to
    the cn=config tree.
  - debian/slapd.postinst: create /var/run/slapd before updating its
    permissions.
  - debian/slapd.init: Correctly set slapd config backend option even if
    the pidfile is configured in slapd default file.
* Dropped:
  - Merged in Debian:
    - 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.
    - Bump build-dependency on debhelper to 6 instead of 5, since that's
      what we're using.
    - Set the default SLAPD_SERVICES to ldap:/// ldapi:///, instead of using
      the built-in default of ldap:/// only.
  - Fixed in upstream release:
    - debian/patches/fix-ldap_back_entry_get_rwa.patch: fix test-0034
      failure when built with PIE.
    - debian/patches/gnutls-enable-v1-ca-certs: Enable V1 CA certs to be
      trusted.
  - Update Apparmor profile support: don't support upgrade from pre-hardy
    systems:
    - debian/slapd.postinst: Reload AA profile on configuration
    - debian/control: Recommends apparmor >= 2.1+1075-0ubuntu6
    - debian/control: Conflicts with apparmor-profiles <<
      2.1+1075-0ubuntu4 to make sure that if earlier version of
      apparmor-profiles gets installed it won't overwrite our profile.
    - follow ApparmorProfileMigration and force apparmor complain mode on
      some upgrades
    - debian/slapd.preinst: create symlink for force-complain on
      pre-feisty upgrades, upgrades where apparmor-profiles profile is
      unchanged (ie non-enforcing) and upgrades where apparmor profile
      does not exist.
  - debian/patches/autogen.sh: no longer needed with karmic libtool.
    - Call libtoolize with the --install option to install
      config.{guess,sub} files.

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.8 2009/01/22 00:00:48 kurt Exp $
 
2
.\" $OpenLDAP: pkg/ldap/doc/man/man1/ldapsearch.1,v 1.59.2.10 2009/06/03 01:41:52 quanah Exp $
3
3
.\" Copyright 1998-2009 The OpenLDAP Foundation All Rights Reserved.
4
4
.\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
5
5
.SH NAME
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.
191
 
For SASL Binds, the server is expected to ignore this value.
 
193
For SASL binds, the server is expected to ignore this value.
192
194
.TP
193
195
.B \-W
194
196
Prompt for simple authentication.
213
215
.TP
214
216
.BI \-h \ ldaphost
215
217
Specify an alternate host on which the ldap server is running.
216
 
Deprecated in favor of -H.
 
218
Deprecated in favor of \fB\-H\fP.
217
219
.TP
218
220
.BI \-p \ ldapport
219
221
Specify an alternate TCP port where the ldap server is listening.
220
 
Deprecated in favor of -H.
 
222
Deprecated in favor of \fB\-H\fP.
221
223
.TP
222
224
.BI \-b \ searchbase
223
225
Use \fIsearchbase\fP as the starting point for the search instead of
224
226
the default.
225
227
.TP
226
 
.BI \-s \ base\fR\||\|\fIone\fR\||\|\fIsub\fR\||\|\fIchildren
 
228
.BR \-s \ { base \||\| one \||\| sub \||\| children }
227
229
Specify the scope of the search to be one of
228
 
.IR base ,
229
 
.IR one ,
230
 
.IR sub ,
 
230
.BR base ,
 
231
.BR one ,
 
232
.BR sub ,
231
233
or
232
 
.I children
 
234
.B children
233
235
to specify a base object, one-level, subtree, or children search.
234
236
The default is
235
 
.IR sub .
 
237
.BR sub .
236
238
Note:
237
239
.I children
238
240
scope requires LDAPv3 subordinate feature extension.
239
241
.TP
240
 
.BI \-a \ never\fR\||\|\fIalways\fR\||\|\fIsearch\fR\||\|\fIfind
 
242
.BR \-a \ { never \||\| always \||\| search \||\| find }
241
243
Specify how aliases dereferencing is done.  Should be one of
242
 
.IR never ,
243
 
.IR always ,
244
 
.IR search ,
 
244
.BR never ,
 
245
.BR always ,
 
246
.BR search ,
245
247
or
246
 
.I find
 
248
.B find
247
249
to specify that aliases are never dereferenced, always dereferenced,
248
250
dereferenced when searching, or dereferenced only when locating the
249
251
base object for the search.  The default is to never dereference aliases.
250
252
.TP
251
 
.BI \-P \ 2\fR\||\|\fI3
 
253
.BR \-P \ { 2 \||\| 3 }
252
254
Specify the LDAP protocol version to use.
253
255
.TP
254
 
.B \-e \fI[!]ext[=extparam]\fP
 
256
.BR \-e \ [ ! ] \fIext\fP [ =\fIextparam\fP ]
255
257
.TP
256
 
.B \-E \fI[!]ext[=extparam]\fP
 
258
.BR \-E \ [ ! ] \fIext\fP [ =\fIextparam\fP ]
257
259
 
258
 
Specify general extensions with -e and search extensions with -E.
259
 
\'!\' indicates criticality.
 
260
Specify general extensions with \fB\-e\fP and search extensions with \fB\-E\fP.
 
261
\'\fB!\fP\' indicates criticality.
260
262
 
261
263
General extensions:
262
264
.nf
275
277
  [!]domainScope                               (domain scope)
276
278
  [!]mv=<filter>                               (matched values filter)
277
279
  [!]pr=<size>[/prompt|noprompt]       (paged results/prompt)
278
 
  [!]sss=[-]<attr[:OID]>[/[-]<attr[:OID]>...]  (server side sorting)
 
280
  [!]sss=[\-]<attr[:OID]>[/[\-]<attr[:OID]>...]  (server side sorting)
279
281
  [!]subentries[=true|false]           (subentries)
280
282
  [!]sync=ro[/<cookie>]                        (LDAP Sync refreshOnly)
281
283
          rp[/<cookie>][/<slimit>]     (LDAP Sync refreshAndPersist)
329
331
Specify the requested authorization ID for SASL bind.
330
332
.I authzid
331
333
must be one of the following formats:
332
 
.B dn:\c
333
 
.I <distinguished name>
 
334
.BI dn: "<distinguished name>"
334
335
or
335
 
.B u:\c
336
 
.I <username>
 
336
.BI u: <username>
337
337
.TP
338
338
.BI \-Y \ mech
339
339
Specify the SASL mechanism to be used for authentication. If it's not
340
340
specified, the program will choose the best mechanism the server knows.
341
341
.TP
342
 
.B \-Z[Z]
 
342
.BR \-Z [ Z ]
343
343
Issue StartTLS (Transport Layer Security) extended operation. If you use
344
 
.B \-ZZ\c
345
 
, the command will require the operation to be successful.
 
344
\fB\-ZZ\fP, the command will require the operation to be successful.
346
345
.SH OUTPUT FORMAT
347
346
If one or more entries are found, each entry is written to standard
348
347
output in LDAP Data Interchange Format or
361
360
    ...
362
361
.fi
363
362
.LP
364
 
If the -t option is used, the URI of a temporary file
365
 
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
366
365
is given, only the "attributename" part is written.
367
366
.SH EXAMPLE
368
367
The following command:
369
368
.LP
370
369
.nf
371
 
    ldapsearch -LLL "(sn=smith)" cn sn telephoneNumber
 
370
    ldapsearch \-LLL "(sn=smith)" cn sn telephoneNumber
372
371
.fi
373
372
.LP
374
373
will perform a subtree search (using the default search base and
384
383
    cn: John Smith
385
384
    cn: John T. Smith
386
385
    sn: Smith
387
 
    sn;lang-en: Smith
388
 
    sn;lang-de: Schmidt
389
 
    telephoneNumber: 1 555 123-4567
 
386
    sn;lang\-en: Smith
 
387
    sn;lang\-de: Schmidt
 
388
    telephoneNumber: 1 555 123\-4567
390
389
 
391
390
    dn: uid=sss,dc=example,dc=com
392
391
    cn: Steve Smith
393
392
    cn: Steve S. Smith
394
393
    sn: Smith
395
 
    sn;lang-en: Smith
396
 
    sn;lang-de: Schmidt
397
 
    telephoneNumber: 1 555 765-4321
 
394
    sn;lang\-en: Smith
 
395
    sn;lang\-de: Schmidt
 
396
    telephoneNumber: 1 555 765\-4321
398
397
.fi
399
398
.LP
400
399
The command:
401
400
.LP
402
401
.nf
403
 
    ldapsearch -LLL -u -t "(uid=xyz)" jpegPhoto audio
 
402
    ldapsearch \-LLL \-u \-t "(uid=xyz)" jpegPhoto audio
404
403
.fi
405
404
.LP
406
405
will perform a subtree search using the default search base for entries
413
412
.nf
414
413
    dn: uid=xyz,dc=example,dc=com
415
414
    ufn: xyz, example, com
416
 
    audio:< file:///tmp/ldapsearch-audio-a19924
417
 
    jpegPhoto:< file:///tmp/ldapsearch-jpegPhoto-a19924
 
415
    audio:< file:///tmp/ldapsearch\-audio\-a19924
 
416
    jpegPhoto:< file:///tmp/ldapsearch\-jpegPhoto\-a19924
418
417
.fi
419
418
.LP
420
419
This command:
421
420
.LP
422
421
.nf
423
 
    ldapsearch -LLL -s one -b "c=US" "(o=University*)" o description
 
422
    ldapsearch \-LLL \-s one \-b "c=US" "(o=University*)" o description
424
423
.fi
425
424
.LP
426
425
will perform a one-level search at the c=US level for all entries
443
442
    o: University of Colorado at Denver
444
443
    o: UCD
445
444
    o: CU/Denver
446
 
    o: CU-Denver
 
445
    o: CU\-Denver
447
446
    description: Institute for Higher Learning and Research
448
447
 
449
448
    dn: o=University of Florida,c=US