Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I was trying to setup an LDAP server for my development. For this purpose, I have chose CentOS 6.3 install it in VirtualBox host in Fedora 17. I'm following this tutorial to guide me on this setup, anyhow when I start the service using this command service slapd start, I got this error:

Checking configuration files for slapd:   [FAILED]
/etc/openldap/slapd.conf: line 9: bad config line.
slaptest: bad configuration file!

I'm sure I have this file /etc/openldap/slapd.conf to the owner of ldap. May I know any idea to rectified this problem?

UPDATE

I have extract the first few lines of text from slapd.conf, looking at line 9, that is an empty line.

#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include     /etc/openldap/schema/core.schema
include     /etc/openldap/schema/cosine.schema
include     /etc/openldap/schema/inetorgperson.schema
include     /etc/openldap/schema/nis.schema

# Added for policy
include /etc/openldap/schema/ppolicy.schema

# Allow LDAPv2 client connections.  This is NOT the default.
allow bind_v2

# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral   ldap://root.openldap.org

pidfile     /var/run/openldap/slapd.pid
argsfile    /var/run/openldap/slapd.args
share|improve this question
3  
maybe first check out what the line 9 on the config says... vi /etc/openldap/slapd.conf then :9 . –  maniat1k Jan 30 '13 at 14:06
    
I have check on that file, but it is an empty line there. Any clue on this? –  huahsin68 Feb 1 '13 at 0:55
    
It may not be the answer to your question, but have you tried Apache Directory studio? It comes with an integrated LDAP server and with a cool GUI LDAP editor which i found perfect for quick LDAP development: directory.apache.org/studio –  Martino Dino Feb 1 '13 at 2:30
1  
if line 9 is empty maybe the problem is on line 8: /etc/openldap/schema/nis.schema what about this schema? –  maniat1k Feb 1 '13 at 15:22
add comment

1 Answer

Remove the blank lines in your slapd.conf file; that fixed it for me.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.