Polish version

LDAP as Network Information Service

  1. Introduction
  2. Why LDAP ?
  3. Server instalation
  4. PAM and NSS
  5. Migration
  6. Replication
  7. Security
  8. Sendmail
  9. Other

Introduction

Managing system information even in network with small number of computers can be quite difficult. If you want to add new user you have to add it on all machines or use some scripts to distribute this task.
Password management is even bigger problem. Users have to change their passwords on one of the machines and you need some distribution system to transfer it. These tasks can be simplified using LDAP. All the information needed by the machines is stored in LDAP server and they access it on-line.
Document describes how to setup LDAP based network information system for your network and how it can co-exist with plain files. Configuration has been tested on Linux and Solaris servers and workstations however it should be possible tu use it on other types of UNIX.

Why LDAP ?

Server instalation

Short description of OpenLDAP instalation: When you have OpenLDAP installed you have to configure it. Edit <LDAP_DIR>/etc/openldap/slapd.conf. Important entries are:

PAM and NSS

Base LDAP client software for UNIX system includes pam-ldap and nss-ldap. The first is responsible for authorization and the second reads information about users, groups, hosts etc. from LDAP server and provides it to the rest of the system.

Instalation:

Both modules use common configuration file /etc/ldap.conf. You can take default configuration from pam-ldap package and make some modifications: You also have to edit /etc/nsswitch.conf to enable LDAP support for NSS. Depending on type of your system you must edit /etc/pam.conf or /etc/pam.d/*. Example files are included in modules packages.

Migration

There are two ways you can switch to LDAP:

Replication

Using central source of information has many advantages but also has big disadvantage. If for some reasons server host will be inaccessible from client your system will be practically useless for users. To solve this problem you can use mechanism implemented in LDAP servers called replication. One of the servers is used as master and others work as slaves (replicas). Every change in content of master LDAP is propagated to replicas. When client can not access master server it will connect to replica.
How to add replication to existing system:

Security

During user authentication pam_ldap tries to bind to server with user's password. In standard transmision clear password is sent. To protect password use of encryption is needed.

Configuration:

Sendmail

One of the most interesting application of LDAP used in Mail Transfer Agents is possibility to store mail aliases definitions. There are two main advantages of such solution: Configuration:

Other

Automounter

Configuration:

© 2002-2003 Rafal Metkowski