Securing-Optimizing-RH-Linux-1_2_325
Comments and suggestions concerning this book should be mailed to gmourani@videotron.ca
© Copyright 1999-2000 Gerhard Mourani and Open Network Architecture ®
325
mail: gmourani@videotron.ca
title: Author
objectclass: person
dn: cn=Anthony Bay, o=openarch, c=com
cn: Anthony Bay
sn: Bay
homephone: (444) 111-2233
mobile: (444) 555-6677
mail: abay@openarch.com
objectclass: person
dn: cn=George Parker, o=openarch, c=com
cn: George Parker
sn: Parker
telephonenumber: (555) 234-5678
fax: (543) 987-6543
mobile: (543) 321-4354
description: E-Commerce
objectclass: person
The above example show you how to convert you information into a LDIF files before add them
to your new backend directory. Consult your OpenLDAP documentation or book for more
information.
Step 2
Once the LDIF input file containing our entries have been created, we must insert it in the LDAP
directory server.
·
To insert the LDIF input file and create the database off-line, use the following command:
[root@deep tmp]# ldif2ldbm -i <inputfile> -f <slapdconfigfile>
[root@deep tmp]# ldif2ldbm -i my-data-file -f /etc/openldap/slapd.conf
The -i option + the <inputfile> option specifies the location of the LDIF input file containing the
entries in text form to add. The <slapdconfigfile> option specifies the location of the slapd
configuration file, which tells where to create the indexes, what indexes to create, etc.
NOTE: It is important to note that the slapd daemon of LDAP is not started in this mode of
creation.
Creation of the LDMB backend database on-line with the ldapadd tool
If the entries in your directory server are already created or if you have only a small amount of
information to insert in your backend database, youll prefer to use the ldapadd command utility
to make your job on-line. For example, to add the Europe Mourani entry using the ldapadd
tool, you could create a file called newentry in your /tmp directory.
Step 1
Create the newentry file (touch /tmp/newentry) and add in this file the following contents:
cn=Europe Mourani, o=openarch, c=com
cn=Europe Mourani
sn=Mourani
mail=emourani@old.com
description=Marketing relation
objectClass=person