LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 882|回复: 7

ldap问题

[复制链接]
发表于 2005-8-15 21:36:40 | 显示全部楼层 |阅读模式
我的redaht9.0
#rpm -qa |grep ldap
openldap-2.0.27-8
nss_ldap-202-5
php-ldap-4.2.2-17

/etc/ldap.conf     /etc/openldap 有此文件夹,但无slapd.conf文件,又不知如何启动该服务?
看资料为:、/etc/init.d/slapd restart .
但我启动不了。

于是我从网上下载一个新的:

#rpm  -ivh  openldap-2.2..26-1.src.rpm
又出现:error: can not create %sourcedir  /usr/src/redhat/SOURCES


谁能将告诉我why??是不是在redhat9.0不需要slapd.conf,还少启动了服务?

希望高手多多关注!!!!
发表于 2005-8-16 01:31:44 | 显示全部楼层
Post by clarke
我的redaht9.0
#rpm -qa |grep ldap
openldap-2.0.27-8
nss_ldap-202-5
php-ldap-4.2.2-17

/etc/ldap.conf     /etc/openldap 有此文件夹,但无slapd.conf文件,又不知如何启动该服务?
看资料为:、/etc/init.d/slapd restart .
但我启动不了。

于是我从网上下载一个新的:

#rpm  -ivh  openldap-2.2..26-1.src.rpm
又出现:error: can not create %sourcedir  /usr/src/redhat/SOURCES


谁能将告诉我why??是不是在redhat9.0不需要slapd.conf,还少启动了服务?

希望高手多多关注!!!!


That's a source rpm, you will need to install it and compile it yourself. check the /usr/src/redhat dir see if you have all the build env setup.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-8-16 20:12:42 | 显示全部楼层
first:  thank you !
second : i have downloaded  openldap-2.0.27-8.i386.rpm
third: rpm -ivh  openldap-2.0.27-8.i386.rpm
fourth:this step is success
fifth: locte slapd.conf
/usr/share/man/man5/slapd.conf.5.gz
accordiong to information slapd.conf should locate in /etc/
sixth: rpm -q  openldap
openldap-2.0.27-8
this indicate openldap has installed,but slapd.conf is none!

Please tell me the reason?
whether need  redhat 9.0  not this  file ? and is there other file to set?


Finally. how to deploy LDAP server ?

Thanks for your kind attentions!!
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-8-18 16:14:59 | 显示全部楼层
who  can help me?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-8-21 22:27:07 | 显示全部楼层
my ldap server has been strated.

but i can not  add user to ldap server.

#service ldap restart
#ldapsearch -x -b ' ' -s base '(objectclass=*)'  namingContexts
namingContexts is null
But i shave set dn and dc  and saved it
i search this 'cn=**'  every time. it indicates  " NO   such object"

who can tell me the reason???


thanks for your kind attention!!
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-8-24 22:34:02 | 显示全部楼层
我怎么老是添加不上用户?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-8-29 15:33:35 | 显示全部楼层
添加用户的规则是什么?
我为何老是添加不上去?
到底要不要空格?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-8-29 22:08:28 | 显示全部楼层
slapd.conf

# $OpenLDAP: pkg/ldap/servers/slapd/slapd.conf,v 1.8.8.7 2001/09/27 20:00:31 kurt Exp $
#
# 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
include                /etc/openldap/schema/redhat/rfc822-MailMember.schema
include                /etc/openldap/schema/redhat/autofs.schema
include                /etc/openldap/schema/redhat/kerberosobject.schema

# Define global ACLs to disable default read access.

# 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

# Create a replication log in /var/lib/ldap for use by slurpd.
#replogfile        /var/lib/ldap/master-slapd.replog

# Load dynamic backend modules:
# modulepath        /usr/sbin/openldap
# 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 connections using a dummy test
# certificate, but you should generate a proper certificate 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.
# TLSCertificateFile /usr/share/ssl/certs/slapd.pem
# TLSCertificateKeyFile /usr/share/ssl/certs/slapd.pem
# TLSCACertificateFile /usr/share/ssl/certs/ca-bundle.crt
#
# Sample Access Control
#        Allow read access of root DSE
#        Allow self write access
#        Allow authenticated users read access
#        Allow anonymous users to authenticate
#
#access to dn="" by * read
#access to *
#        by self write
#        by users read
#        by anonymous auth
#
# if no access controls are present, the default is:
#        Allow read by all
#
# rootdn can always write!

#######################################################################
# ldbm database definitions
#######################################################################

database        ldbm
#suffix "dc=123,dc=com"
suffix "o=clarke"
#rootdn "cn=root,dc=123,dc=com"
rootdn "cn=root,o=clarke"
# Cleartext passwords, especially for the rootdn, should
# be avoided.  See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
rootpw                secret
# rootpw                {crypt}ijFYNcSNctBYg
# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd/tools. Mode 700 recommended.
directory        /var/lib/ldap
# Indices to maintain
index        objectClass,uid,uidNumber,gidNumber,memberUid        eq
index        cn,mail,surname,givenname                        eq,subinitial
# Replicas to which we should propagate changes
#replica host=ldap-1.example.com:389 tls=yes
#        bindmethod=sasl saslmech=GSSAPI
#        authcId=host/ldap-master.example.com@EXAMPLE.COM

--------------------------------------------
test.ldif:
dn: o=clarke
o: clarke
objectclass: top
objectclass: organization
dn: ou=editors, o=clarke
ou: editors
objectclass: organizationalUnit

dn: uid=aghaffar, ou=editors, o=clarke
uid: aghaffar
cn: Atif Ghaffar
givename: Atif
objectclass: person
uerpassword: 12345678
mailacceptinggeneralid: aghaffar@yx.com
ou: editors
------------------------------------------------------------------------------------------------------------------

#ldapadd -D "cn=root,o=clarke" -w secret <test.ldif
ladp_sasl_interactive_bind_s: No such attribute


哪位大虾能告诉我如何解决?????

望穿秋水!!!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表