directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szoer...@apache.org
Subject svn commit: r993140 - in /directory/apacheds-manuals/trunk/src/basic-user-guide: handling-of-data-3-operations.xml images/studio_mod_add_1.png
Date Mon, 06 Sep 2010 19:58:59 GMT
Author: szoerner
Date: Mon Sep  6 19:58:59 2010
New Revision: 993140

URL: http://svn.apache.org/viewvc?rev=993140&view=rev
Log:
Added some content for data manipulation (adding an entry)

Added:
    directory/apacheds-manuals/trunk/src/basic-user-guide/images/studio_mod_add_1.png   (with
props)
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=993140&r1=993139&r2=993140&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
Mon Sep  6 19:58:59 2010
@@ -612,11 +612,158 @@ uid: wbligh
 
   <section id="LDAP Operations Modification">
      <title>Modification</title>
+     
      <para>
        This section gives an overview on how to manipulate entries within your directory.

        Manipulating data with the help of Apache Directory Studio and graphical tools in
general is straight forward. 
-       This section therefore concentrates on using LDIF and command line tools.
+       This section therefore concentrates on using LDIF and command line tools. 
+       The steps are basically the same with a UI tool, in many cases easier to accomplish,
but harder to document.
      </para>
+     
+     <section>
+       <title>Adding an entry</title>
+       
+       <para>
+       Let's start with adding a new entry to the "Seven Seas" partition 
+       (it is therefore assumed that you have already imported the sample data).
+       </para>
+       
+       <para>
+       <emphasis>A person to add --</emphasis>
+       
+       The data of the person to add is inspired by "Peter Pan" and provided by this LDIF
file (captain_hook.ldif):
+       </para>
+       
+       <programlisting><![CDATA[
+# File captain_hook.ldif
+dn: cn=James Hook,ou=people,o=sevenSeas
+objectclass: person
+objectclass: top
+cn: James Hook
+description: A pirate captain and Peter Pan's nemesis
+sn: Hook
+userpassword: peterPan
+       ]]></programlisting>
+       
+       <para>
+       The entry with distinguished name "cn=James Hook,ou=people,o=sevenSeas" describes
a person. 
+       In the default schema of ApacheDS (as defined in RFC 2256), object class person requires
attribute values for cn (common name) and sn (surname). 
+       The other attributes are optional. The following screenshot of the schema browser
of Apache Directory Studio illustrates this:
+       
+       <figure id="studio_mod_add_1">
+         <title>Object class person in Schema Browser</title>
+         <mediaobject>
+           <imageobject>
+             <imagedata fileref="images/studio_mod_add_1.png" />
+           </imageobject>
+         </mediaobject>
+       </figure>
+       </para>  
+       
+       <para>
+       <emphasis>Using a command line tool to add the entry --</emphasis>
+       It depends on your authorization configuration, which directory users are allowed
to add entries (or generally to manipulate data). 
+       The administrator uid=admin,ou=system is always allowed to do anything; thus we use
him here for authentication.
+       With ldapmodify, the data above can be added to the sample partition like this: 
+       </para>      
+       
+       <programlisting><![CDATA[
+$ ldapmodify -h zanzibar -p 10389 -D "uid=admin,ou=system" -w ****** -a -f captain_hook.ldif
+adding new entry cn=James Hook,ou=people,o=sevenSeas
+$
+       ]]></programlisting>
+       
+       <para>
+       The following table contains descriptions for the options used. See the manpage of
ldapmodify for details.
+       </para>
+       
+       <table>
+         <title>Command line options used in the modify example</title>
+         <tgroup cols="3">
+         <colspec colnum="1" colname="col1" colwidth="2*"/>
+         <colspec colnum="2" colname="col2" colwidth="3*"/>
+         <thead>
+           <row>
+             <entry>Option</entry>
+             <entry>Meaning</entry>
+           </row>
+         </thead>
+         <tbody>
+            <row>
+              <entry>-h zanzibar</entry>
+              <entry>Hostname of LDAP server to connect to (default is localhost)</entry>
+            </row>
+            <row>
+              <entry>-p 10389</entry>
+              <entry>Port on which the server listens (default is 389)</entry>
+            </row>
+            <row>
+              <entry>-D "uid=admin,ou=system"</entry>
+              <entry>Distinguished name to bind (user with appropriate privileges needed)</entry>
+            </row>
+            <row>
+              <entry>-w ******</entry>
+              <entry>Password of bind user (Replace with appropriate value)</entry>
+            </row>
+            <row>
+              <entry>-a</entry>
+              <entry>add new entries</entry>
+            </row>            
+            <row>
+              <entry>-f captain_hook.ldif</entry>
+              <entry>Name of LDIF file to load</entry>
+            </row>            
+        </tbody>
+        </tgroup>
+        </table>
+        
+        <para>
+        Note that the file contains only one entry, but it is possible to add several entries
at once with a single ldapmodify call. 
+        An LDIF file can contain an arbitrary number of entries, seperated by an empty line.

+        An ldapmodify call as above would try to add them one by one.
+        </para>
+        
+        <para>
+        <emphasis>Verification --</emphasis>
+        With the help of the ldapsearch command, you can verify that the entry is indeed
present in the directory.
+        </para>
+        
+        <programlisting><![CDATA[
+$ ldapsearch -h zanzibar -p 10389 -D "uid=admin,ou=system" -w secret -b "o=sevenSeas" -s
sub "(cn=James*)"
+version: 1
+dn: cn=James Hook,ou=people,o=sevenSeas
+userpassword: peterPan
+description: A pirate captain and Peter Pan's nemesis
+objectclass: person
+objectclass: top
+sn: Hook
+cn: James Hook
+$
+       ]]></programlisting>
+       
+       <para>
+       Another option for verification is to use a graphical tool like Apache Directory Studio.
+       </para>     
+ 
+       
+       
+       
+     
+     </section>
+     
+     <section>
+       <title>Modifying an entry</title>
+       
+       <para>
+       LDIF can either be used to describe complete entries, like Caption Hook in the example
before, 
+       or to describe a set of changes made (or to be mode) to directory entries. 
+       In the following we use the latter variant. 
+       We present simple LDIF files with changes to an entry (Hook again, the samples assume
his existence within the tree) 
+       and apply them to the directory.
+       </para>
+     
+     </section>
+     
 
 
 

Added: directory/apacheds-manuals/trunk/src/basic-user-guide/images/studio_mod_add_1.png
URL: http://svn.apache.org/viewvc/directory/apacheds-manuals/trunk/src/basic-user-guide/images/studio_mod_add_1.png?rev=993140&view=auto
==============================================================================
Binary file - no diff available.

Propchange: directory/apacheds-manuals/trunk/src/basic-user-guide/images/studio_mod_add_1.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



Mime
View raw message