mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Mark Craig
16.38.2012 3deda08dbcccdf08a53d2c0c6d7bafb36c4ed93c
Update based on review comments from Violette

Although + and @<objectclass> are shown in examples in the Admin Guide chapter on LDAP operations, it would help to have them in the search tool reference (man pages). It also would help to say what a filter is, too.
6 files modified
462 ■■■■■ changed files
opendj3/src/main/docbkx/admin-guide/man-ldapsearch.xml 84 ●●●●● patch | view | raw | blame | history
opendj3/src/main/docbkx/admin-guide/man-ldifsearch.xml 60 ●●●●● patch | view | raw | blame | history
opendj3/src/main/docbkx/shared/man-ldapsearch.xml 84 ●●●●● patch | view | raw | blame | history
opendj3/src/main/docbkx/shared/man-ldifsearch.xml 60 ●●●●● patch | view | raw | blame | history
opends/resource/man/man1/ldapsearch.1 106 ●●●● patch | view | raw | blame | history
opends/resource/man/man1/ldifsearch.1 68 ●●●●● patch | view | raw | blame | history
opendj3/src/main/docbkx/admin-guide/man-ldapsearch.xml
@@ -52,12 +52,6 @@
  <title>Description</title>
  <para>This utility can be used to perform LDAP search operations in the
  directory.</para>
  <para>In the list of attributes to return, you can specify
  <literal>*</literal> to return all user attributes, <literal>+</literal> to
  return all operational attributes, and
  <literal>@<replaceable>object-class</replaceable></literal> to return
  all attributes associated with the <replaceable>object-class</replaceable>
  such as <literal>@person</literal>.</para>
 </refsect1>
 <refsect1>
  <title>Options</title>
@@ -390,6 +384,44 @@
  </refsect2>
 </refsect1>
 <refsect1>
  <title>Filter</title>
  <para>The filter argument is a string representation of an LDAP search filter
  as in <literal>(cn=Babs Jensen)</literal>, <literal
  >(&amp;(objectClass=Person)(|(sn=Jensen)(cn=Babs J*)))</literal>, or
  <literal>(cn:caseExactMatch:=Fred Flintstone)</literal>.</para>
 </refsect1>
 <refsect1>
  <title>Attribute</title>
  <para>The optional attribute list specifies the attributes to return in the
  entries found by the search. In addition to identifying attributes by name
  such as <literal>cn sn mail</literal> and so forth, you can use the following
  notations, too.</para>
  <variablelist>
   <varlistentry>
    <term><literal>*</literal></term>
    <listitem>
     <para>Return all user attributes such as <literal>cn</literal>,
     <literal>sn</literal>, and <literal>mail</literal>.</para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term><literal>+</literal></term>
    <listitem>
     <para>Return all operational attributes such as <literal>etag</literal>
     and <literal>pwdPolicySubentry</literal>.</para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term><literal>@<replaceable>objectclass</replaceable></literal></term>
    <listitem>
     <para>Return all attributes of the specified object class, where
     <replaceable>objectclass</replaceable> is one of the object classes
     on the entries returned by the search.</para>
    </listitem>
   </varlistentry>
  </variablelist>
 </refsect1>
 <refsect1>
  <title>Exit Codes</title>
   <variablelist>
    <varlistentry>
@@ -458,5 +490,45 @@
Result Code:  0 (Success)</screen>
  <para>You can also use <literal>@<replaceable
  >objectclass</replaceable></literal> notation in the attribute list to return
  the attributes of a particular object class. The following example shows
  how to return attributes of the <literal>inetOrgPerson</literal> object
  class.</para>
  <screen>$ ldapsearch -p 1389 -b dc=example,dc=com "(uid=bjensen)" @inetorgperson
dn: uid=bjensen,ou=People,dc=example,dc=com
givenName: Barbara
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: top
uid: bjensen
cn: Barbara Jensen
cn: Babs Jensen
telephoneNumber: +1 408 555 1862
sn: Jensen
roomNumber: 0209
mail: bjensen@example.com
l: Cupertino
ou: Product Development
ou: People
facsimileTelephoneNumber: +1 408 555 1992</screen>
  <para>You can use <literal>+</literal> in the attribute list to return
  all operational attributes, as in the following example.</para>
  <screen>$ ldapsearch -p 1389 -b dc=example,dc=com "(uid=bjensen)" +
dn: uid=bjensen,ou=People,dc=example,dc=com
numSubordinates: 0
structuralObjectClass: inetOrgPerson
etag: 0000000073c29972
pwdPolicySubentry: cn=Default Password Policy,cn=Password Policies,cn=config
subschemaSubentry: cn=schema
hasSubordinates: false
entryDN: uid=bjensen,ou=people,dc=example,dc=com
entryUUID: fc252fd9-b982-3ed6-b42a-c76d2546312c</screen>
 </refsect1>
</refentry>
opendj3/src/main/docbkx/admin-guide/man-ldifsearch.xml
@@ -138,6 +138,44 @@
  </variablelist>
 </refsect1>
 <refsect1>
  <title>Filter</title>
  <para>The filter argument is a string representation of an LDAP search filter
  as in <literal>(cn=Babs Jensen)</literal>, <literal
  >(&amp;(objectClass=Person)(|(sn=Jensen)(cn=Babs J*)))</literal>, or
  <literal>(cn:caseExactMatch:=Fred Flintstone)</literal>.</para>
 </refsect1>
 <refsect1>
  <title>Attribute</title>
  <para>The optional attribute list specifies the attributes to return in the
  entries found by the search. In addition to identifying attributes by name
  such as <literal>cn sn mail</literal> and so forth, you can use the following
  notations, too.</para>
  <variablelist>
   <varlistentry>
    <term><literal>*</literal></term>
    <listitem>
     <para>Return all user attributes such as <literal>cn</literal>,
     <literal>sn</literal>, and <literal>mail</literal>.</para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term><literal>+</literal></term>
    <listitem>
     <para>Return all operational attributes such as <literal>etag</literal>
     and <literal>pwdPolicySubentry</literal>.</para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term><literal>@<replaceable>objectclass</replaceable></literal></term>
    <listitem>
     <para>Return all attributes of the specified object class, where
     <replaceable>objectclass</replaceable> is one of the object classes
     on the entries returned by the search.</para>
    </listitem>
   </varlistentry>
  </variablelist>
 </refsect1>
 <refsect1>
  <title>Exit Codes</title>
  <variablelist>
   <varlistentry>
@@ -181,5 +219,27 @@
uidNumber: 1076
gidNumber: 1000
</screen>
  <para>You can also use <literal>@<replaceable
  >objectclass</replaceable></literal> notation in the attribute list to return
  the attributes of a particular object class. The following example shows
  how to return attributes of the <literal>posixAccount</literal> object
  class.</para>
  <screen>$ ldifsearch --ldifFile /path/to/Example.ldif
 --baseDN dc=example,dc=com "(uid=bjensen)" @posixaccount
dn: uid=bjensen,ou=People,dc=example,dc=com
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: top
uid: bjensen
userpassword: hifalutin
cn: Barbara Jensen
cn: Babs Jensen
homeDirectory: /home/bjensen
uidNumber: 1076
gidNumber: 1000</screen>
 </refsect1>
</refentry>
opendj3/src/main/docbkx/shared/man-ldapsearch.xml
@@ -52,12 +52,6 @@
  <title>Description</title>
  <para>This utility can be used to perform LDAP search operations in the
  directory.</para>
  <para>In the list of attributes to return, you can specify
  <literal>*</literal> to return all user attributes, <literal>+</literal> to
  return all operational attributes, and
  <literal>@<replaceable>object-class</replaceable></literal> to return
  all attributes associated with the <replaceable>object-class</replaceable>
  such as <literal>@person</literal>.</para>
 </refsect1>
 <refsect1>
  <title>Options</title>
@@ -369,6 +363,44 @@
  </refsect2>
 </refsect1>
 <refsect1>
  <title>Filter</title>
  <para>The filter argument is a string representation of an LDAP search filter
  as in <literal>(cn=Babs Jensen)</literal>, <literal
  >(&amp;(objectClass=Person)(|(sn=Jensen)(cn=Babs J*)))</literal>, or
  <literal>(cn:caseExactMatch:=Fred Flintstone)</literal>.</para>
 </refsect1>
 <refsect1>
  <title>Attribute</title>
  <para>The optional attribute list specifies the attributes to return in the
  entries found by the search. In addition to identifying attributes by name
  such as <literal>cn sn mail</literal> and so forth, you can use the following
  notations, too.</para>
  <variablelist>
   <varlistentry>
    <term><literal>*</literal></term>
    <listitem>
     <para>Return all user attributes such as <literal>cn</literal>,
     <literal>sn</literal>, and <literal>mail</literal>.</para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term><literal>+</literal></term>
    <listitem>
     <para>Return all operational attributes such as <literal>etag</literal>
     and <literal>pwdPolicySubentry</literal>.</para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term><literal>@<replaceable>objectclass</replaceable></literal></term>
    <listitem>
     <para>Return all attributes of the specified object class, where
     <replaceable>objectclass</replaceable> is one of the object classes
     on the entries returned by the search.</para>
    </listitem>
   </varlistentry>
  </variablelist>
 </refsect1>
 <refsect1>
  <title>Exit Codes</title>
   <variablelist>
    <varlistentry>
@@ -437,5 +469,45 @@
Result Code:  0 (Success)</screen>
  <para>You can also use <literal>@<replaceable
  >objectclass</replaceable></literal> notation in the attribute list to return
  the attributes of a particular object class. The following example shows
  how to return attributes of the <literal>inetOrgPerson</literal> object
  class.</para>
  <screen>$ ldapsearch -p 1389 -b dc=example,dc=com "(uid=bjensen)" @inetorgperson
dn: uid=bjensen,ou=People,dc=example,dc=com
givenName: Barbara
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: top
uid: bjensen
cn: Barbara Jensen
cn: Babs Jensen
telephoneNumber: +1 408 555 1862
sn: Jensen
roomNumber: 0209
mail: bjensen@example.com
l: Cupertino
ou: Product Development
ou: People
facsimileTelephoneNumber: +1 408 555 1992</screen>
  <para>You can use <literal>+</literal> in the attribute list to return
  all operational attributes, as in the following example.</para>
  <screen>$ ldapsearch -p 1389 -b dc=example,dc=com "(uid=bjensen)" +
dn: uid=bjensen,ou=People,dc=example,dc=com
numSubordinates: 0
structuralObjectClass: inetOrgPerson
etag: 0000000073c29972
pwdPolicySubentry: cn=Default Password Policy,cn=Password Policies,cn=config
subschemaSubentry: cn=schema
hasSubordinates: false
entryDN: uid=bjensen,ou=people,dc=example,dc=com
entryUUID: fc252fd9-b982-3ed6-b42a-c76d2546312c</screen>
 </refsect1>
</refentry>
opendj3/src/main/docbkx/shared/man-ldifsearch.xml
@@ -119,6 +119,44 @@
  </variablelist>
 </refsect1>
 <refsect1>
  <title>Filter</title>
  <para>The filter argument is a string representation of an LDAP search filter
  as in <literal>(cn=Babs Jensen)</literal>, <literal
  >(&amp;(objectClass=Person)(|(sn=Jensen)(cn=Babs J*)))</literal>, or
  <literal>(cn:caseExactMatch:=Fred Flintstone)</literal>.</para>
 </refsect1>
 <refsect1>
  <title>Attribute</title>
  <para>The optional attribute list specifies the attributes to return in the
  entries found by the search. In addition to identifying attributes by name
  such as <literal>cn sn mail</literal> and so forth, you can use the following
  notations, too.</para>
  <variablelist>
   <varlistentry>
    <term><literal>*</literal></term>
    <listitem>
     <para>Return all user attributes such as <literal>cn</literal>,
     <literal>sn</literal>, and <literal>mail</literal>.</para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term><literal>+</literal></term>
    <listitem>
     <para>Return all operational attributes such as <literal>etag</literal>
     and <literal>pwdPolicySubentry</literal>.</para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term><literal>@<replaceable>objectclass</replaceable></literal></term>
    <listitem>
     <para>Return all attributes of the specified object class, where
     <replaceable>objectclass</replaceable> is one of the object classes
     on the entries returned by the search.</para>
    </listitem>
   </varlistentry>
  </variablelist>
 </refsect1>
 <refsect1>
  <title>Exit Codes</title>
  <variablelist>
   <varlistentry>
@@ -162,5 +200,27 @@
uidNumber: 1076
gidNumber: 1000
</screen>
  <para>You can also use <literal>@<replaceable
  >objectclass</replaceable></literal> notation in the attribute list to return
  the attributes of a particular object class. The following example shows
  how to return attributes of the <literal>posixAccount</literal> object
  class.</para>
  <screen>$ ldifsearch --ldifFile /path/to/Example.ldif
 --baseDN dc=example,dc=com "(uid=bjensen)" @posixaccount
dn: uid=bjensen,ou=People,dc=example,dc=com
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: top
uid: bjensen
userpassword: hifalutin
cn: Barbara Jensen
cn: Babs Jensen
homeDirectory: /home/bjensen
uidNumber: 1076
gidNumber: 1000</screen>
 </refsect1>
</refentry>
opends/resource/man/man1/ldapsearch.1
@@ -2,12 +2,12 @@
.\"     Title: ldapsearch
.\"    Author: 
.\" Generator: DocBook XSL-NS Stylesheets v1.76.1 <http://docbook.sf.net/>
.\"      Date: 03/21/2012
.\"      Date: 10/16/2012
.\"    Manual: Tools Reference
.\"    Source: OpenDJ 2.5.0
.\"  Language: English
.\"
.TH "LDAPSEARCH" "1" "03/21/2012" "OpenDJ 2\&.5\&.0" "Tools Reference"
.TH "LDAPSEARCH" "1" "10/16/2012" "OpenDJ 2\&.5\&.0" "Tools Reference"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -35,17 +35,6 @@
.SH "DESCRIPTION"
.PP
This utility can be used to perform LDAP search operations in the directory\&.
.PP
In the list of attributes to return, you can specify
*
to return all user attributes,
+
to return all operational attributes, and
@\fIobject\-class\fR
to return all attributes associated with the
\fIobject\-class\fR
such as
@person\&.
.SH "OPTIONS"
.PP
The following options are supported\&.
@@ -320,6 +309,40 @@
.RS 4
Display usage information
.RE
.SH "FILTER"
.PP
The filter argument is a string representation of an LDAP search filter as in
(cn=Babs Jensen),
(&(objectClass=Person)(|(sn=Jensen)(cn=Babs J*))), or
(cn:caseExactMatch:=Fred Flintstone)\&.
.SH "ATTRIBUTE"
.PP
The optional attribute list specifies the attributes to return in the entries found by the search\&. In addition to identifying attributes by name such as
cn sn mail
and so forth, you can use the following notations, too\&.
.PP
*
.RS 4
Return all user attributes such as
cn,
sn, and
mail\&.
.RE
.PP
+
.RS 4
Return all operational attributes such as
etag
and
pwdPolicySubentry\&.
.RE
.PP
@\fIobjectclass\fR
.RS 4
Return all attributes of the specified object class, where
\fIobjectclass\fR
is one of the object classes on the entries returned by the search\&.
.RE
.SH "EXIT CODES"
.PP
0
@@ -399,6 +422,63 @@
.if n \{\
.RE
.\}
.PP
You can also use
@\fIobjectclass\fR
notation in the attribute list to return the attributes of a particular object class\&. The following example shows how to return attributes of the
inetOrgPerson
object class\&.
.sp
.if n \{\
.RS 4
.\}
.nf
$ ldapsearch \-p 1389 \-b dc=example,dc=com "(uid=bjensen)" @inetorgperson
dn: uid=bjensen,ou=People,dc=example,dc=com
givenName: Barbara
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: top
uid: bjensen
cn: Barbara Jensen
cn: Babs Jensen
telephoneNumber: +1 408 555 1862
sn: Jensen
roomNumber: 0209
mail: bjensen@example\&.com
l: Cupertino
ou: Product Development
ou: People
facsimileTelephoneNumber: +1 408 555 1992
.fi
.if n \{\
.RE
.\}
.PP
You can use
+
in the attribute list to return all operational attributes, as in the following example\&.
.sp
.if n \{\
.RS 4
.\}
.nf
$ ldapsearch \-p 1389 \-b dc=example,dc=com "(uid=bjensen)" +
dn: uid=bjensen,ou=People,dc=example,dc=com
numSubordinates: 0
structuralObjectClass: inetOrgPerson
etag: 0000000073c29972
pwdPolicySubentry: cn=Default Password Policy,cn=Password Policies,cn=config
subschemaSubentry: cn=schema
hasSubordinates: false
entryDN: uid=bjensen,ou=people,dc=example,dc=com
entryUUID: fc252fd9\-b982\-3ed6\-b42a\-c76d2546312c
.fi
.if n \{\
.RE
.\}
.SH "COPYRIGHT"
.br
Copyright \(co 2011-2012 ForgeRock AS
opends/resource/man/man1/ldifsearch.1
@@ -2,12 +2,12 @@
.\"     Title: ldifsearch
.\"    Author: 
.\" Generator: DocBook XSL-NS Stylesheets v1.76.1 <http://docbook.sf.net/>
.\"      Date: 03/21/2012
.\"      Date: 10/16/2012
.\"    Manual: Tools Reference
.\"    Source: OpenDJ 2.5.0
.\"  Language: English
.\"
.TH "LDIFSEARCH" "1" "03/21/2012" "OpenDJ 2\&.5\&.0" "Tools Reference"
.TH "LDIFSEARCH" "1" "10/16/2012" "OpenDJ 2\&.5\&.0" "Tools Reference"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -97,6 +97,40 @@
.RS 4
Display usage information\&.
.RE
.SH "FILTER"
.PP
The filter argument is a string representation of an LDAP search filter as in
(cn=Babs Jensen),
(&(objectClass=Person)(|(sn=Jensen)(cn=Babs J*))), or
(cn:caseExactMatch:=Fred Flintstone)\&.
.SH "ATTRIBUTE"
.PP
The optional attribute list specifies the attributes to return in the entries found by the search\&. In addition to identifying attributes by name such as
cn sn mail
and so forth, you can use the following notations, too\&.
.PP
*
.RS 4
Return all user attributes such as
cn,
sn, and
mail\&.
.RE
.PP
+
.RS 4
Return all operational attributes such as
etag
and
pwdPolicySubentry\&.
.RE
.PP
@\fIobjectclass\fR
.RS 4
Return all attributes of the specified object class, where
\fIobjectclass\fR
is one of the object classes on the entries returned by the search\&.
.RE
.SH "EXIT CODES"
.PP
0
@@ -143,6 +177,36 @@
.if n \{\
.RE
.\}
.PP
You can also use
@\fIobjectclass\fR
notation in the attribute list to return the attributes of a particular object class\&. The following example shows how to return attributes of the
posixAccount
object class\&.
.sp
.if n \{\
.RS 4
.\}
.nf
$ ldifsearch \-\-ldifFile /path/to/Example\&.ldif
 \-\-baseDN dc=example,dc=com "(uid=bjensen)" @posixaccount
dn: uid=bjensen,ou=People,dc=example,dc=com
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: top
uid: bjensen
userpassword: hifalutin
cn: Barbara Jensen
cn: Babs Jensen
homeDirectory: /home/bjensen
uidNumber: 1076
gidNumber: 1000
.fi
.if n \{\
.RE
.\}
.SH "COPYRIGHT"
.br
Copyright \(co 2011-2012 ForgeRock AS