| ||||||||||||||||||
|
Installation of a LDAP serverLDAP ?!LDAP and its uses explained.
With OpenLDAP you can save information in a tree structure and make these accessible to others. For example, you can create a complete address- and e-mail- tree, or you set up the complete structure of a company with OpenLDAP. In this HOWTO we will describe the installation of an OpenLDAP server using SuSE Linux 7.0. Why write this HOWTO? We had to set up an LDAP server and in the Internet found the existing HOWTOs to be too complex, so we had to fight with LDAP on our own. The InstallationInstalling OpenLDAP is quite easy. Select both the packages openldap.rpm
and ldaplib.rpm
which are placed in the sub-group "n"
. We explain this configuration by using our file as an example:
Next you have to edit the file sladp.conf.
Now the OpenLDAP server can be started. Therefore you enter: /sbin/init.d/ldap start and the server should run!
Creation of a databaseThe creation of a database is very complex because you must know the whole structure beforehand. In this part we try to describe the set-up of a database using ours and explain how to add data and container objects. First you have to create a new directory "ldif" in /etc/openldap: >> cd /etc/openldap >> mkdir ldif >> cd ldif Here you create your database using any editor. We call it datenbank.ldif .
Now the first database is set-up and has to be added to the LDAP server! This works with the command: >> ldapadd -D "cn=Manager, o=testnet.de" -w secret < /etc/openldap/ldif /datenbank.ldif Tthe program should copy that command. To be sure that it worked you simply try the command: >> ldapsearch uid=tover Now you should get all data to this "uid" . Adding more data setsAdding more data sets requires an additional file. We call it new.ldif.
>> ldapadd -D "cn=Manager, o=testnet.de" -w secret < /etc/openldap/ldif /new.ldif Adding more container objects: Similar steps would be necessary if you tried to add another container object. Once again, you create a file which is called container.ldif.
You add this container object using the command ldapadd: >> ldapadd -D "cn=Manager, o=testnet.de" -w secret < /etc/openldap/ldif /container.ldif Now in this container the user with the id hwurst exists. We hope the syntax becomes clear to you by following these examples. (Another way of administration is by using the tool kldap, although we won't describe this now! )
Access the data with NetscapeYou can access the LDAP server using the address book of Netscape. We describe how this works. Open Netscape and click on : Communicator > Address Book Chose File and create a new Directory. Here you fill in the corresponding fields:
Now you can search the data with "Search For...". That should be all! We hope we made it easier for you to set up an LDAP server.
Comments & Questions: | |||||||||||||||||
|