我试图为我的开发设置一个 LDAP 服务器。为此,我选择 CentOS 6.3 将其安装在 Fedora 17 的 VirtualBox 主机中。我正在关注本教程为了指导我进行此设置,无论如何,当我使用此命令启动服务时service slapd start
,我收到此错误:
Checking configuration files for slapd: [FAILED]
/etc/openldap/slapd.conf: line 9: bad config line.
slaptest: bad configuration file!
我确信我已经将此文件/etc/openldap/slapd.conf
交给了 ldap 的所有者。我可以知道解决这个问题的任何想法吗?
更新
我已经从 中提取了前几行文本slapd.conf
,看看line 9
,那是一个空行。
#
# 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
答案1
删除文件中的空白行slapd.conf
;这为我解决了。