If the entries in your directory server are already created or if you have only a small amount of information to insert into your backend database, you'll prefer to use the ldapadd command utility to do
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
Example 26-2. LDMB backend
Create the newentry file, touch/tmp/newentry and add in this file the following contents:
Contrary to relational databases where data is constantly changed, the directory server contains information that is rarely modified once inserted. But, some times you need to modify information, and the ldapmodify
tool will help you in your tasks. The ldapmodify command allows you to add or modify entries on the backend directory server.
Example 26-3. modifyentry
Assuming that we want to replace the contents of the Europe Mourani entry's mail attribute with the new value [email protected], the following steps will be require:
Create the modifyentry file, touch/tmp/modifyentry and add in this file the contents:
cn=Europe Mourani, o=openna, c=com
- [email protected] # will delete the old mail address for Europe Mourani in the database.
[email protected] # will add the new mail address for Europe Mourani in the database.
Once the modifyentry file has been created, we must replace the entry in the LDAP directory server with the one contained in this file -modifyentry.
To modify the contents of backend database, use the following command: