Friday, March 23, 2007

Discovering a legacy purpose for LDAP / slapd

If you're on a legacy Linux/Unix system, and you notice slapd running a directory service, you might wonder: what is this directory service for? What is slapd doing? Why is ldap here? Why do I have slpad running? What data is slapd serving? [I'm playing with search engines here -- I typed these questions into google and found nothing quickly.]

A search of the data will answer most of your questions.

ldapsearch

.. is a common LDAP client command on Linux/Unix. It will tell you if no ldap is available ("Can't contact LDAP server").

But, even with a slapd daemon running, you won't find any data by typing this command with no arguments. You need to tell it where to start looking: the base of the ordered data on the local server.

So, find the config file -- usually somewhere like /etc/ldap/slapd.conf. If it isn't there, use "locate slapd" or "locate ldap" to find it.

In the file, you'll see something vaguely like this:

# The base of your directory
suffix "dc=onething,dc=something,dc=else"

Use the string in quotes to search your directory:

ldapsearch -b "dc=onething,dc=something,dc=else"

You'll see the data, and then the purpose of LDAP on your server should be quite clear.

0 Comments:

Post a Comment

<< Home