From commits-return-27263-apmail-directory-commits-archive=directory.apache.org@directory.apache.org Wed Sep 01 13:34:02 2010 Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 86548 invoked from network); 1 Sep 2010 13:34:02 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Sep 2010 13:34:02 -0000 Received: (qmail 39089 invoked by uid 500); 1 Sep 2010 13:34:01 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 39028 invoked by uid 500); 1 Sep 2010 13:34:00 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 39020 invoked by uid 99); 1 Sep 2010 13:33:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Sep 2010 13:33:59 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Sep 2010 13:33:51 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 6FDB223889ED; Wed, 1 Sep 2010 13:32:32 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r991532 - /directory/apacheds-manuals/trunk/src/basic-user-guide/handling-of-data-3-operations.xml Date: Wed, 01 Sep 2010 13:32:32 -0000 To: commits@directory.apache.org From: szoerner@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100901133232.6FDB223889ED@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: szoerner Date: Wed Sep 1 13:32:32 2010 New Revision: 991532 URL: http://svn.apache.org/viewvc?rev=991532&view=rev Log: Added some content for search (command line tools, JNDI) Modified: directory/apacheds-manuals/trunk/src/basic-user-guide/handling-of-data-3-operations.xml Modified: directory/apacheds-manuals/trunk/src/basic-user-guide/handling-of-data-3-operations.xml URL: http://svn.apache.org/viewvc/directory/apacheds-manuals/trunk/src/basic-user-guide/handling-of-data-3-operations.xml?rev=991532&r1=991531&r2=991532&view=diff ============================================================================== --- directory/apacheds-manuals/trunk/src/basic-user-guide/handling-of-data-3-operations.xml (original) +++ directory/apacheds-manuals/trunk/src/basic-user-guide/handling-of-data-3-operations.xml Wed Sep 1 13:32:32 2010 @@ -243,6 +243,10 @@ under the License. Search operators + + + + @@ -303,6 +307,10 @@ under the License.
Boolean operators in search filters + + + + @@ -361,13 +369,169 @@ under the License.
Searching with a command line tool + If you connect to ApacheDS with command line tools, you execute searches against the directory with the ldapsearch command. + + + Here is an example: The query searches all entries below "ou=people,o=sevenSeas" + which match the filter + , + and therefore all persons called William. + + + + + The tool returns the attribute values for the attributes given in the command line (uid and mail). + If no attributes are provided, all attributes the user is allowed to read will be returned. + +
+ Command line options used in the search example + + + + + + + Option + Example value + Meaning + + + + + -h + zanzibar + Hostname of LDAP server to connect to (default is localhost) + + + -p + 10389 + Port on which the server listens (default is 389) + + + -D + "uid=admin,ou=system" + Distinguished name of bind user + + + -w + secret + Password of bind user + + + -b + "ou=people,o=sevenSeas" + search base + + + -s + sub + search scope, one of "base", "one", or "sub" (default is sub) + + + + +
+ +
Searching with a Java program + Here is the same search as above, performed against the "Seven seas" example from within a Java program with the help of JNDI. + + + the output of the program looks like this: + + + + Key for LDAP searches with JNDI are the search methods in the javax.naming.directory.DirContext interface + (javadoc). + Learn more about JNDI and how to perform searches against an LDAP directory with it in the + JNDI tutorial +