# LDAP Implementation HOWTO

v0.4 02 Feb, 2001
Roel
van
Meer
Linvision BV

    r.vanmeer@linvision.com

Giuseppe
Lo
Biondo
INFN MI

    giuseppe.lobiondo@mi.infn.it

We are trying to use Ldap as a central database to store all users-related information. This document describes the process of HOW TO do this. Currently supported are the standard pam-authenticated login services, usage of a company-wide addressbook, and the storage of sendmails routing information.

0.4
Feb 02, 2001
rvm
Added dns section.
0.3
Jan 18, 2001
rvm
Added MTA sections.
0.2
Nov 12, 2000
glb
Improved section on nss. Added sections about certificates and wrappers.

## Overview

### Why?

The main goal of this project is to create a single place where all information is stored about users and their accounts, whether it be unix login, NT domain logon or printer access, if people have email or ftp accounts. Right now it is all stored in just too many files, like `/etc/passwd`, `/etc/group`, `smbpasswd` and `aliases`, just to name a few.

That means that right now, when your sysadmin has to give someone an account, all these files need to be updated, a number of tools need to be executed, and this implies, especially when the system becomes more extensive, a detailed level of knowledge of all these services and how to manage them. When all information is stored in a single place, only one tool is needed to maintain your system. This has a few advantages. It is easier and less time-consuming to maintain user accounts on a system, so now someone with limited knowledge of the systems internal structure can do this. Additionally, it is possible to change the services or the internal services, without having to change the way user accounts are managed.

A third advantage of this is that roaming accesss can be easily configured. If a database already exists with records of all your users, a little more data can easily be added. Of course, this argument is only valid if you already did the actual work and installed the bunch...

### How?

In short: LDAP. A little less short: The Lightweight Directory Access Protocol is the database in which all the information will be stored. It has a directory-based structure, which means you can store information in it through a directory or tree structure. You can store about anything you want in it. And this has the advantage that when something new comes into play it is very likely that the additional information that needs to be stored can be seamlessly merged with the existing data.

Another advantage is the scaleability that Ldap provides. Ldap databases can be easily replicated, so it would be possible to have multiple ldap servers all replicating from a master server. This improves the reliability, and it creates the possibility to devide the load on larger networks between different servers.

### What?

Most of the common services can be authenticated through PAM, Pluggable Authentication Modules. With the pam_ldap and nss_ldap modules, all pamified programs can get their information from LDAP. More information about PAM in general can be found on the Linux-PAM site. Information about pam_ldap and nss_ldap can be found on the padl software site.

For Samba, things are a little difficult at this moment. The current stable Samba versions do not have Ldap support. Ldap support can be found in the HEAD and TNG branch, and probably also in the combined tree. The problem is that samba has it's own usernames and passwords. It does have usage for PAM, in fact, but that is not sufficient to do all the authentication and retrieval of user information. Because the implementation of LDAP in samba is not fully finished yet, there are a few limitations to the use of ldap with samba. From my experiences, the HEAD is at this time (early June 2000) not stable enough, and the performance is unsatisfying. However, when the ldap support is fully functional in the new releases, samba too can be configured to get all of it's user information from ldap.

Another thing that can be stored into an ldap database is DNS. When the amount of machines connected to your network increases, it is no longer feasable to edit the DNS files by hand. When machine accounts are stored into ldap, two simple DNS entries (one for the lookup, and one for the reverse lookup) can easily be added at the same time. This too provides a simplification of system management. Although the storage of DNS entries in an ldap database may not be neccesary, for most systems (this depends for example on your network layout, and the way you use dhcp), it may prove useful to some people.

Since sendmail version 8.9 (see sendmail.net for more details), sendmail has Ldap support. When setting up an email system which has multiple mailhosts and or fallback hosts, it is convenient to store all the information in one place. Normally, every system needs to be configured separately, with the same information. When using ldap, this can be avoided.

Roaming access can also be used with LDAP. Netscape versions 4.5 and up have the possibility to store user data like bookmarks and such via an HTML or LDAP server. This gives users their good old preferences, wherever they log in and use Netscape.

Microsoft's office programs can import address books. Thay can also use an Active Directory service to automagically match emailaddresses to user names or nicknames. With Ldap this can be done on a Linux system, without the need for Microsoft Exchange Server or something the like.

### Disclaimer

This document is provided as is and should be considered as a work in progress. Several sections are as yet unfinished, and probably a lot of things that should be in here, aren't. I would greatly appreciate any comments on this document, of whatever nature they may be.

In any case, think before you go messing around with your system and don't come to me if it breaks.

### Copyright and license

Copyright (c) by Roel van Meer, Giuseppe Lo Biondo. This document may be distributed only subject to the terms and conditions set forth in the LDP License at the Linux Documentation Project.

&sectionpamnss; &sectionsasl; &sectionradius; &sectionsamba; &sectiondns; &sectionsendmail; &sectionaddress; &sectionroaming; &sectioncertificates; &sectionssl; &sectionsecurity; &sectionperformance; &sectionttt; &sectionschemas; &sectionfiles;