LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   OpenLDAP error... can't find slapd.conf (http://www.linuxquestions.org/questions/linux-server-73/openldap-error-cant-find-slapd-conf-721784/)

that Linux guy 04-26-2009 08:26 AM

OpenLDAP error... can't find slapd.conf
 
Hey guys.

I'm having issues with trying to start OpenLDAP services on my virtual server. I've been following installing and configuring OpenLDAP via this guide, but it's definitely skimming over where it should go into greater detail. It mentions that most of the defaults for dpkg-reconfigure slapd are good, but making sure to put in your correct FQDN. After numerous tries doing this method, I decided to stop using dpkg to configure slapd and simply edit the /etc/ldap/slapd.conf.

I've input my necessary info for my domain, and saved it, but after trying to stop or start slapd, this is the error I get:

"No Configuration file was found for slapd at /etc/ldap/slapd.conf.
If you have moved the slapd configuration file please modify
/etc/default/slapd to reflect this. If you choose not to configure slapd during installation then you need to do so prior to attempting to start slapd."

I checked out /etc/default/slapd, and the first option I see is:

#Default location for the slapd.conf configuration file. If empty use the
#compiled in default (/etc/ldap/slapd.conf). If using the cn=config backend to
#store configuration in LDIF, set this variable to the directory containing
#cn=config data.
SLAPD_CONF=

Leaving it empty gives the the "No Configuration file was found" error. I'm confused. Anyone have any ideas?

that Linux guy 04-26-2009 04:43 PM

bump

billymayday 04-26-2009 05:01 PM

Please don't bump posts - the system will do this itself, and you'll simply get a lot of members offside doing so.

Can you show

ls -l /etc/ldap

and

cat /etc/default/slapd

?

that Linux guy 04-27-2009 12:59 PM

Quote:

Originally Posted by billymayday (Post 3521784)
Please don't bump posts - the system will do this itself, and you'll simply get a lot of members offside doing so.

Can you show

ls -l /etc/ldap

and

cat /etc/default/slapd

?

Sorry for the bump. Some forums don't care and other do. I get mixed up on which.

andrew@server:~$ ls -l /etc/ldap
total 20
-rw-r--r-- 1 root root 245 2008-08-05 16:21 ldap.conf
drwxr-xr-x 2 root root 4096 2008-08-05 16:21 sasl2
drwxr-xr-x 2 root root 4096 2009-04-23 05:06 schema
-rw-r----- 1 root openldap 4744 2009-04-23 05:25 slapd.conf

andrew@server:~$ cat /etc/default/slapd
# Default location of the slapd.conf file. If empty, use the compiled-in
# default (/etc/ldap/slapd.conf). If using the cn=config backend to store
# configuration in LDIF, set this variable to the directory containing the
# cn=config data.
SLAPD_CONF=/etc/ldap/slapd.conf

# System account to run the slapd server under. If empty the server
# will run as root.
SLAPD_USER="openldap"

# System group to run the slapd server under. If empty the server will
# run in the primary group of its user.
SLAPD_GROUP="openldap"

# Path to the pid file of the slapd server. If not set the init.d script
# will try to figure it out from $SLAPD_CONF (/etc/ldap/slapd.conf by
# default)
SLAPD_PIDFILE=

# slapd normally serves ldap only on all TCP-ports 389. slapd can also
# service requests on TCP-port 636 (ldaps) and requests via unix
# sockets.
# Example usage:
# SLAPD_SERVICES="ldap://127.0.0.1:389/ ldaps:/// ldapi:///"

# If SLAPD_NO_START is set, the init script will not start or restart
# slapd (but stop will still work). Uncomment this if you are
# starting slapd via some other means or if you don't want slapd normally
# started at boot.
#SLAPD_NO_START=1

# If SLAPD_SENTINEL_FILE is set to path to a file and that file exists,
# the init script will not start or restart slapd (but stop will still
# work). Use this for temporarily disabling startup of slapd (when doing
# maintenance, for example, or through a configuration management system)
# when you don't want to edit a configuration file.
SLAPD_SENTINEL_FILE=/etc/ldap/noslapd

# For Kerberos authentication (via SASL), slapd by default uses the system
# keytab file (/etc/krb5.keytab). To use a different keytab file,
# uncomment this line and change the path.
#export KRB5_KTNAME=/etc/krb5.keytab

# Additional options to pass to slapd
SLAPD_OPTIONS=""

Thanks for any ideas.

ketzaldev 05-04-2009 11:19 AM

Hi all,

I have a similar problem with my openldap configuration.
I'm on Ubuntu 8.10 and openldap version is 2.4.11.

When i installed openldap, I did a dpkg-reconfigure to setup domain, password, etc...

In my ldap directory (/etc/ldap) slapd.conf is missing.
I thought it was about dpkg-reconfigure, and removed openldap from my system, installed again and it's the same... (I noticed that the configuration I did on dpgk-reconfigure is the same after re-installation without doing the reconfigure).

Do you have any idea about that.

Cheers

zeos 05-05-2009 11:30 AM

Quote:

Originally Posted by ketzaldev (Post 3529686)
Hi all,

I have a similar problem with my openldap configuration.
I'm on Ubuntu 8.10 and openldap version is 2.4.11.

When i installed openldap, I did a dpkg-reconfigure to setup domain, password, etc...

In my ldap directory (/etc/ldap) slapd.conf is missing.
I thought it was about dpkg-reconfigure, and removed openldap from my system, installed again and it's the same... (I noticed that the configuration I did on dpgk-reconfigure is the same after re-installation without doing the reconfigure).

Do you have any idea about that.

Cheers

Check out the howto for ubuntu 8.10 (and above) here https://help.ubuntu.com/8.10/serverg...ap-server.html

The slapd.conf is depreciated, all of the configuration is now stored in the database itself (though it is possible to use the old method too)

ketzaldev 05-06-2009 02:08 AM

Hi Zeos, Thanks four your reply.

I omitted to tell that I'm using openldap for egroupware 1.6

I found this the howto for ubuntu 8.10 on internet, and I did it. This is a nice procedure, but my problem is a little more complicated. I made a new schema like explained for mozillaorgperson, I inserted it on slapd.d by ldapadd. After doing that, I was able to create new entries, etc...

As I'm on Ubuntu, and openLDAP do not support full DN for PosixGroup, I found on a forum that I need to replace NIS schema by RFC2703bis schema. The problem is that NIS schema is used on openldap and cannot be deleted if server is up.

I tried a lot of things, like create a new schema (with slaptest as in Ubuntu howto), modify headers and copy it widely on slapd.d, the result is that openldap is not able to start now :(

I'm a little bit disappointed, and I don't know what to do.
Maybe the best way should be to create a slapd.conf file and convert it into slapd.d by slaptest.

Have you got any idea?
Ket'

kaos_kutang 10-17-2011 07:46 AM

re :
 
try to use " sudo " before your command
like

sudo /etc/init.d/slapd start


All times are GMT -5. The time now is 10:47 PM.