免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2865 | 回复: 7
打印 上一主题 下一主题

openldap問題請教(原問題已解決),現出現新問題,請看最後發貼 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-05-09 17:06 |只看该作者 |倒序浏览
最近兩天一直在配置openldap,可是總是不能啟動,現把問題提出來,向大家請教:
我在操作系統是ras 4.0,配置文件如下:
#
# 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
# Allow LDAPv2 client connections.  This is NOT the default.
allow bind_v2
loglevel -1
# 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/slapd.pid
argsfile /var/run/slapd.args
# Load dynamic backend modules:
# modulepath /usr/sbin/openldap
# moduleload back_bdb.la
# moduleload back_ldap.la
# moduleload back_ldbm.la
# moduleload back_passwd.la
# moduleload back_shell.la
# The next three lines allow use of TLS for encrypting connections using a
# dummy test certificate which you can generate by changing to
# /usr/share/ssl/certs, running "make slapd.pem", and fixing permissions on
# slapd.pem so that the ldap user or group can read it.  Your client software
# may balk at self-signed certificates, however.
# TLSCACertificateFile /usr/share/ssl/certs/ca-bundle.crt
# TLSCertificateFile /usr/share/ssl/certs/slapd.pem
# TLSCertificateKeyFile /usr/share/ssl/certs/slapd.pem
# Sample security restrictions
# Require integrity protection (prevent hijacking)
# Require 112-bit (3DES or better) encryption for updates
# Require 63-bit encryption for simple bind
# security ssf=1 update_ssf=112 simple_bind=64
# Sample access control policy:
# Root DSE: allow anyone to read it
# Subschema (sub)entry DSE: allow anyone to read it
# Other DSEs:
#  Allow self write access
#  Allow authenticated users read access
#  Allow anonymous users to authenticate
# Directives needed to implement policy:
# access to dn.base="" by * read
# access to dn.base="cn=Subschema" by * read
# access to *
# by self write
# by users read
# by anonymous auth
#
# if no access controls are present, the default policy
# allows anyone and everyone to read anything but restricts
# updates to rootdn.  (e.g., "access to * by * read"
#
# rootdn can always read and write EVERYTHING!
#######################################################################
# ldbm and/or bdb database definitions
#######################################################################
database bdb
#database ldbm
#suffix  "dc=my-domain,dc=com"
suffix  "dc=hualin,dc=com"
#rootdn  "cn=Manager,dc=my-domain,dc=com"
rootdn  "cn=root,dc=hualin,dc=com"
# Cleartext passwords, especially for the rootdn, should
# be avoided.  See slappasswd( and slapd.conf(5) for details.
# Use of strong authentication encouraged.
# rootpw  secret
# rootpw  {crypt}ijFYNcSNctBYg
rootpw {SSHA}nYCLjeK16zfEy3/1ipLlQgdR6syC9hVc
# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd and slap tools.
# Mode 700 recommended.
directory /var/lib/ldap
# Indices to maintain for this database
index objectClass                       eq,pres
index ou,cn,mail,surname,givenname      eq,pres,sub
index uidNumber,gidNumber,loginShell    eq,pres
index uid,memberUid                     eq,pres,sub
index nisMapName,nisMapEntry            eq,pres,sub
# Replicas of this database
#replogfile /var/lib/ldap/openldap-master-replog
#replica host=ldap-1.example.com:389 starttls=critical
#     bindmethod=sasl saslmech=GSSAPI
#     [email=authcId=host/ldap-master.example.com@EXAMPLE.COM]authcId=host/ldap-master.example.com@EXAMPLE.COM[/email]
啟動出錯信息為:
[root@mail ~]# service ldap start
Checking configuration files for : config file testing succeeded
Starting slapd:                                            [FAILED]
[root@mail ~]#
因為急需用到ldap功能,還請那位xljm幫助,在此多謝了。

[ 本帖最后由 garyguan 于 2007-5-12 14:05 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2007-05-10 12:22 |只看该作者
#slapd -d 256  (-d用来指定调试信息输出级别)
执行一下如上命令,把结果贴上来帮你分析一下.

论坛徽章:
0
3 [报告]
发表于 2007-05-10 13:23 |只看该作者
@(#) $OpenLDAP: slapd 2.2.13 (Aug 19 2004 21:22:15) $
        root@porky.build.redhat.com:/usr/src/build/440386-i386/BUILD/openldap-2. 2.13/openldap-2.2.13/build-servers/servers/slapd
bdb_initialize: Sleepycat Software: Berkeley DB 4.2.52: (December  3, 2003)
bdb_initialize: Sleepycat Software: Berkeley DB 4.2.52: (December  3, 2003)
TLS: could not load client CA list (file:`',dir:`/etc/openldap/cacerts').
TLS: error:0200A002:system librarypendir:No such file or directory ssl_cert.c: 750
TLS: error:140D7002:SSL routines:SSL_add_dir_cert_subjects_to_stack:system lib s sl_cert.c:752
main: TLS init def ctx failed: -1
slapd stopped.
connections_destroy: nothing to destroy.

謝啦,還不知道可以這樣調試的~~~

论坛徽章:
0
4 [报告]
发表于 2007-05-10 13:27 |只看该作者
問題已解決,原來建一個cacerts目錄就可以了,哎~~

论坛徽章:
0
5 [报告]
发表于 2007-05-10 13:38 |只看该作者
嗯,祝贺你!希望给了你一些帮助……

论坛徽章:
0
6 [报告]
发表于 2007-05-11 11:47 |只看该作者
不管怎麼樣,謝謝你,謝謝cu的朋友們

论坛徽章:
0
7 [报告]
发表于 2007-05-12 14:15 |只看该作者
因為在使用phpldapadmin輸入dn,密碼決是出現錯誤,無法登錄進去,於是想先用命令加入一個下文件test.ldif:
dn: dc=hualin,dc=com
objectClass: top
objectClass: domain
objectClass: organization
dc: hualin
o: hualin.com
description: hualin.com ldap


dn: ou=mis,dc=hualin,dc=com
ou: people
objectClass: organizationalUnit

結果就錯:Can't contact a ldap server (-1),
此時發現slapd服務已經沒有在進程,已停止服務,使用slapd -d 256調試
出現以下錯誤:
root@porky.build.redhat.com:/usr/src/build/440386-i386/BUILD/openldap-2.2.13/openldap-2.2.13/build-servers/servers/slapd
daemon: bind(6) failed errno=98 (Address already in use) daemon: bind(6) failed errno=98 (Address already in use) slapd stopped. connections_destroy: nothing to destroy.
到openldap.org網站查閱相關資料,得不到解決辦法。

论坛徽章:
0
8 [报告]
发表于 2007-05-28 17:16 |只看该作者
看一下FANDY的文章,不要再这样浪费时间了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP