Linux.com

Everything Linux and Open Source

Approaching LDAP Migration

February 04, 2004 (8:00:00 AM)  -  5 years, 9 months ago

By: Brian K. Jones

LDAP is not your father's naming and directory service. Application vendors large and small, commercial and open source alike, have embraced LDAP as a centralized service for authentication and 'white pages' type information. These days, if you're not wearing a 'got root?' t-shirt and yelling at the suits to get LDAP, you're probably the suits wondering if LDAP is right for your environment. With features for security and integration far beyond that of other services, LDAP is probably something you should spend at least a bit of time discovering. Let's get started!

I've asked a number of friends (including consultants, administrators, and managers) about the idea of migrating to LDAP. Generally they get a look on their face like I just asked them to quit smoking or stop eating fast food. The look says, "I know it's probably the direction I should be going, but I dunno." Then they usually ask something like "Where do I start?" or "Will it work with (insert name of application or platform here)?". This, the first of a new series of weekly columns on Linux.com for system managers, offers a few things to consider before beginning the migration, and lays out some steps you can follow to get you moving.

Why Move to LDAP?

Let's start by taking a look at some of the reasons behind a migrationto LDAP:

Although there are still a few areas where LDAP support is not where it should be, for many environments LDAP works with everything NIS does, and then some. A couple of quick examples:

Wow! And these examples are just the tip of the iceberg. In addition to system services, many companies use LDAP as a corporate "white pages" solution, because so many email and calendar applications are LDAP-compatible. Netscape, Mozilla, Evolution, Outlook, KMail, and many more email clients have robust support for LDAP, and even text-based clients like Mutt and Pine can do address completion based on an LDAP search.

For the discriminating administrator, though, this won't be enough. LDAP plays quite nicely with PAM (Pluggable Authentication Modules), and can be put in place of 'nis' for virtually every line in your /etc/nsswitch file ('man 5 nsswitch.conf'). Once your nsswitch and PAM config is all set up for using LDAP (largely automated on systems which have the 'authconfig' utility), most other system-level mechanisms -- like mapping UID numbers to names inls -l, TCP wrappers, and id -- "just work."

Where do I start?
  1. Evaluate your environment

    While it's easy for me to sit here and say, "The answer is LDAP, what was the question?" I'm all too aware of the fact that LDAP is not a panacea for all that ails your environment. Even if I did somehow sell you on that, it would still be wise to figure out exactly what you want to use LDAP for.

    In some instances, you may have homegrown applications whose login routines might need to be altered to use LDAP. In other scenarios, you might decide that while LDAP can be used immediately for authentication, automounter maps are going to stay in files or maps for now. Don't go planning a NIS server shutdown party just yet! Choose a NIS map -- any NIS map -- and focus on all of the services, applications and systems which depend on that map. Then make sure that they support LDAP, or can be made to support LDAP. You would not be pleased to find out, after 6 months of server regression testing, that a mission-critical application's vendor has never heard of LDAP.

    In my experience, this early stage of LDAP deployment is the longest and most arduous. Once this is out of the way, well, I won't say it's all downhill, but it certainly gets a lot easier, and progress moves faster.

  2. Evaluate possible server choices

    Next (or, concurrently, depending on the size of your team), you'll need to figure out which implementation of LDAP to use. I found this to be an easier choice than I thought it would be. I tested Novell's eDirectory and Sun's SunONE Directory Server software, along with OpenLDAP.

    In all fairness, these are all wonderful applications.

    In fact, I actually came quite close to choosing the Novell product (which runs nicely under Linux, by the way) for a deployment. The team at Novell has done a wonderful job at making LDAP accessible to even mere mortal administrators. Clear, thorough tutorials and documentation emanate profusely from their Web site, and I found that those who frequented the support forums on Novell's site were very friendly, and extremely knowledgeable (some of them were Novell employees).

    The Sun product is also nice, although the GUI interface was a bit more intimidating than Novell's. I also historically have been unable to make friends with the digital labyrinth that is the Sun Web site. Though I did find documentation regarding LDAP, I sometimes found different versions of the same document, conflicting documentation, and steps that were just plain wrong. This has also been my experience in searching for documentation regarding Solaris LDAP client configuration.

    In the end, I chose OpenLDAP mainly for its simplicity. It's essentially an implementation of what you can read in the RFCs about the LDAP protocol. Any other fancy stuff can be built on, customized or added later. The terms used in the RFCs and the old bible 'Understanding and Deploying LDAP Directories' (which is how I learned LDAP) are the same terms used in the interfaces, documentation and configuration files for the OpenLDAP suite. This was comforting.

    Novell and Sun both lack this simplicity. Novell began to show its complexity as soon as I wanted to do something simple like map a user's home directory. The interface, by default, is configured to assume that your user directories reside on a NetWare volume. It also seemed to me that eDirectory was adding a whole list of data attributes to my entries (upon inspection of the data exports) that I hadn't defined in the GUI. The Sun product had similar problems, making all kinds of assumptions about my environment and setting up what it thought I would want.

    These tools just didn't fit my brain very well. You very well may fall in love with them. Price is probably not an issue unless you are a government or some other similarly large corporation. Novell and Sun both allow you to use the software for free (without support, of course) up to so many hundreds of thousands of object entries. However, I felt that if I ran into really big trouble, I was going to find a larger community around the free/open source OpenLDAP than commercial tools from anyone else. Besides, OpenLDAP is, for the most part, built on Linux, for Linux. That's something that the others can never honestly say.

  3. Start with the Clients

    The four words that make up the title of this section comprise the most valuable advice I can think to give anyone approaching an LDAP deployment. Don't go spending time porting applications, cleansing and moving data, and maintaining a directory server until you first test that the clients can actually do what they claim they'll do them the way you want them done.

    In my eyes -- remember, I'm a systems administrator -- client testing starts at the system level. Authentication must work with all of the functionality currently in use. Host resolution, if currently done with something other than DNS, must go off without a hitch. Password policies, tcpwrappers, compat modes, and remote mounts must perform with no perceivable difference on the part of the end user in terms of performance and functionality.


Start with a small set of test data, consult your list of what LDAP is going to be responsible for and which applications it will support, and start reading the man pages, vendor docs, and online tutorials. Join a couple of forums, and join any mailing lists that are pertinent to your project.

Also, return here on occasion, as I'll be writing more on LDAP migration in the coming weeks and months - see you then!
Read in the original layout at: http://www.linux.com/archive/feature/113563