Author: szoerner Date: Sun Sep 5 14:18:09 2010 New Revision: 992790 URL: http://svn.apache.org/viewvc?rev=992790&view=rev Log: Content for command line tools (ldapsearch etc.) added Modified: directory/apacheds-manuals/trunk/src/basic-user-guide/handling-of-data-1-connecting.xml Modified: directory/apacheds-manuals/trunk/src/basic-user-guide/handling-of-data-1-connecting.xml URL: http://svn.apache.org/viewvc/directory/apacheds-manuals/trunk/src/basic-user-guide/handling-of-data-1-connecting.xml?rev=992790&r1=992789&r2=992790&view=diff ============================================================================== --- directory/apacheds-manuals/trunk/src/basic-user-guide/handling-of-data-1-connecting.xml (original) +++ directory/apacheds-manuals/trunk/src/basic-user-guide/handling-of-data-1-connecting.xml Sun Sep 5 14:18:09 2010 @@ -28,6 +28,208 @@ under the License. xml:lang="en"> Connecting to a server + +
+ Apache Directory Studio + +
+ +
+ Command line tools + + + This sections describes how to connect to ApacheDS with command line tools, + which are not part of the distribution, but present on many operating systems. + Is is also possible to download them separately, e.g. for the Windows platform. + + +
+ A powerful alternative to UI tools + + + An alternative to UI tools for connecting to your directory and perform operations are command line tools. + The traditional commands are part of many applications (for instance Lotus notes), + LDAP servers, and even operating systems (e.g. Sun Solaris 8 ff.). + The following table lists the names and functions of common commands. + All of them open a connection to an LDAP server, bind, and perform one or more LDAP operations. + + + Common command line tools + + + + + + Command + Short description from man page + + + + + ldapsearch + Performs a search using specified parameters. + + + ldapmodify and ldapadd + Modifies or adds entries. When invoked as ldapadd the -a (add new entry) flag is turned on automatically. + + + ldapmodrdn + Modifies the RDN of entries. + + + ldapdelete + Deletes one or more entries. + + + +
+
+ + + Open a shell and type "ldapsearch" to see whether these tools are already available on your system. + This may be true on UNIX systems, or LINUX systems (with OpenLDAP client tools installed). + If not (especially if you are using Windows, this is probably the case), you have different options to get such tools. + One is to download the Sun ONE Directory SDK for C, which is available for many platforms (among them Windows). + It also contains executables of the command line tools (ldapsearch etc.). + +
+ +
+ A simple search example + + Here is an example for a search command, which displays the o=sevenSeas entry of our tutorial partition. + You will learn more about LDAP searches lateron. + + + + + One big advantage of command line tools is that you can use them within scripts. + It is also much easier if you have to document changes to the directory (configuration, for instance). + Therfore administrators like them a lot. + We will use them within this tutorial as well, but always as an alternative to UI tools (which LDAP newbies normally prefer). + + + + Not all command line tools are equal + + Although the command line tools of different operating systems + and LDAP clients (shipped with LDAP servers) normally have the same name, + there are often differences in the command line options. + If any problems arise if you try out examples from this tutorial (e.g. "illegal option"), + consult the man pages or documentation of your tools. + + + + +
+ +
+ + Import the sample data + + + Here is an example usage of ldapmodify. It imports the sample data of this guide into an ApacheDS server, + which contains a sevenseas partition (which has been configured before). + + + + + + The following table contains descriptions for the options used. See the manpage of ldapmodify for details. + + Command line options used in import example + + + + + + Option + Meaning + + + + + -h zanzibar + Hostname + + + -p 10389 + Port + + + -D "uid=admin,ou=system" + Distinguished name to bind (user with appropriate privileges needed) + + + -w ****** + Password of bind user + + + -a + add new entries + + + -f apache_ds_tutorial.ldif + Name of LDIF file to load + + + +
+
+ + + The following operation demonstrates that your directory now contains the sample data. + It searches for all entries below o=sevenSeas (-b = search base, -s = search scope), + which have an attribute occurence of givenName with value "William". + The output contains the distinguished names (dn) of the result entries and their common name (cn) values. + + + + +
+ +
+ +
+ Resources + + + Download + Sun ONE Directory SDK for C, which contains the command line tools as well, for various platforms + + +
+