
254 Chapter 19. Lightweight Directory Access Protocol (LDAP)
• slapindex — Reindexes the slapd database based on the actual current database content. Execute
/usr/sbin/slapindex to begin reindexing.
• slappasswd — Generates a user password value for use with ldapmodify or the rootpw value
in /etc/openldap/slapd.conf. Execute /usr/sbin/slappasswd to create the password.
Warning
Be sure to stop slapd before using slapadd, slapcat or slapindex. Otherwise, you are risking the
consistency of your LDAP database.
See the man pages for each of these utilities for more information about how to use them.
19.8. Modules for Adding Extra Functionality to LDAP
Red Hat Linux includes several packages that add functionality to LDAP.
The nss_ldap module is an LDAP module for the Solaris Nameservice Switch (NSS). NSS is a set
of C library extensions necessary for accessing LDAP directory information, instead of or in addition
to the Network Information Service (NIS) name service and/or flat files. The nss_ldap module is
needed to use LDAP as a native name service.
The pam_ldap module is needed to integrate LDAP authentication into the Pluggable Authentication
Modules (PAM) API. If you use pam_ldap, users can authenticate and change their password using
LDAP directories. The nss_ldap and pam_ldap modules are provided in the nss_ldap package.
Red Hat Linux also includes LDAP modules for the Apache Web server. The auth_ldap module is
for authenticating HTTP clients against the user entries in an LDAP directory. The php-ldap module
adds LDAP support to the PHP4 HTML-embedded scripting language. The auth_ldap and php-
ldap modules must be compiled into Apache as Dynamic Shared Objects (DSOs) in order to work.
19.9. OpenLDAP Setup Overview
This section provides a quick overview for installing and configuring an OpenLDAP directory. For
more details, refer to the Quick-Start Guide on the OpenLDAP website available at
http://www.openldap.org/doc/admin/quickstart.html
and the LDAP Linux HOWTO available at
(http://www.redhat.com/mirrors/LDP/HOWTO/LDAP-HOWTO.html
1. Install the openldap, openldap-servers, and openldap-clients RPMs, and any other
LDAP-related RPMs that you need if they are not installed.
2. Edit the /etc/openldap/slapd.conf file to reference your LDAP domain and server. Refer
to Section 19.6.1 for more information.
3. Start slapd with the command:
/sbin/service/ldap start
After you have configured LDAP correctly, you can use chkconfig or serviceconf to configure
LDAP to start up with the system.
Commenti su questo manuale