Labels

new blog 2.0

2007/10/29

0x02. [LPIC-301] LDAP - /etc/init.d/slapd start

In order to start our new server we need to look into the servers configuration file, /etc/openldap/slapd.conf, and configure the base. You should think of:
  • base suffix for your directory, e.g. dc=oozie,dc=tux
  • which database backend you would like to use, e.g. bdb
  • a name for the person ruling the directory, so called rootdn, eg. Manager
  • a good password for rootdn
This is a very basic slapd.conf file:
##
# My slapd.conf
##
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
#
pidfile /var/run/openldap/slapd.pid
argsfile /var/run/openldap/slapd.args
#
database bdb
suffix "dc=oozie,dc=tux"
rootdn "cn=Manager,dc=oozie,dc=tux"
rootpw secret
directory /var/lib/openldap-data
#
password-hash {CLEARTEXT}

Configure also your /etc/openldap/ldap.conf or /etc/ldap.conf accordingly. This is how I do it:
##
# My ldap.conf
##

BASE dc=oozie,dc=tux
HOST 192.168.1.2
URI ldap://192.168.1.2/

Right now, a command /etc/init.d/slapd start should generate some files in /var/lib/openldap-data directory and start OpenLDAP server. The slapd is running, but it's completely empty. If you try to search it through with ldapsearch, it should give you error (32) - No such object.

No comments: