I have been trying to set up my first real openLDAP instance for a login page and I have run into a large problem getting it to start intially. Every time I start LDAP and do an initial search I get a response that indicates that I have no domain set up:
# extended LDIF
#
# LDAPv3
# base <> with scope baseObject
# filter: (objectclass=*)
# requesting: namingContexts
#
#
dn:
namingContexts: dc=nodomain
# search result
search: 2
result: 0 Success
# numResponses: 2
# numEntries: 1
However, my understanding is that if I edit /etc/ldap/slapd.conf to change the suffix I can get the server to start with a domain of my choosing. To that end I have the following slapd.conf:
# slapd.conf - configuration
include /etc/ldap/schema/core.schema
include /etc/ldap/schema/cosine.schema
include /etc/ldap/schema/inetorgperson.schema
pidfile /var/run/slapd/slapd.pid
argsfile /var/run/slapd/slapd.args
loglevel any
modulepath /usr/lib/ldap
# modelpath /usr/local/libexc/openldap
moduleload back_hdb
######################
# DB configuration #
#####################
database hdb
suffix "dc=test,dc=com"
rootdn "cn=root,dc=test,dc=com"
rootpw secret
directory /var/lib/ldap
# directory /usr/local/var/openldap-data
index objectClass,cn eq
########
# ACLs #
########
access to attrs=userPassword
by anonymous auth
by self write
by * none
access to *
by self write
by * none
When I run slapd with debugging switched to config I get some output that I think indicates that my config file is not being loaded; but I am not entirely sure what to look at or look for at this point, and none of the tutorials I have found online have worked around this issue. If it helps anyone, I have done all of my installs and re-installs using apt-get slapd on a ubuntu-11.10 box. This is probably just a dumb mistake caused by my own ignorance, but I am at a loss to find it at this point.
Also I am attaching the startup debug output below just in case someone finds it useful.
@(#) $OpenLDAP: slapd 2.4.25 (Nov 14 2011 21:34:11) $
buildd@yellow:/build/buildd/openldap-2.4.25/debian/build/servers/slapd
loaded module back_hdb
module back_hdb: null module registered
index objectClass 0x0004
slapd starting
You should be using the -H switch with ldapsearch to specify what server to search.
The listeners are set up via the HOST_LIST parameter in /opt/symas/etc/openldap/symas-openldap.conf You can check this file to examine your current setup. The default is to listen on the loopback address.