Chapter 19. Lightweight Directory Access Protocol (LDAP) 255
4. Create your LDAP directory. Examples of LDAP entries are provided at the PADL Software
website:
http://www.padl.com/ldap_examples.html
5. Add entries to your LDAP directory with ldapadd.
6. Use ldapsearch to see if slapd is working.
7. At this point, your LDAP directory should exist. You can now configure your LDAP-enabled
applications to use the LDAP directory.
19.10. Configuring Your System to Authenticate Using OpenLDAP
This section provides a brief overview of how to configure your Red Hat Linux system to authenticate
using OpenLDAP. Unless you are an OpenLDAP expert, you will probably need more documentation
than is provided here. Please refer to the references provided in Section 19.11 for more information.
19.10.1. Install the Necessary LDAP Packages
First, you should make sure that the appropriate packages are installed on both the LDAP server and
the LDAP client machines. The LDAP server needs the openldap-server package.
The LDAP client machines need the following packages installed: openldap, openldap-clients,
auth_ldap, and nss_ldap.
19.10.2. Edit the Configuration Files
19.10.2.1. Edit slapd.conf
Next, edit the /etc/openldap/slapd.conf file to make sure it matches the specifics of your orga-
nization.
Please refer to Section 19.6.1 for instructions on editing slapd.conf.
19.10.2.2. Edit ldap.conf
Edit the ldap.conf file on the LDAP server and clients.
Edit /etc/ldap.conf, the configuration file for nss_ldap and pam_ldap, to reflect your organiza-
tion and search base. The file /etc/openldap/ldap.conf is the configuration file for the command
line tools such as ldapsearch and ldapadd, and it will also need to be edited for your LDAP setup.
Client machines will need to have both of these files modified.
19.10.2.3. Edit /etc/nsswitch.conf
To use nss_ldap, you will need to add ldap to the appropriate fields in /etc/nsswitch.conf. (Be
very careful when editing this file; be sure that you know what you are doing.) For example:
passwd: files ldap
shadow: files ldap
group: files ldap
Commentaires sur ces manuels