添加它们后无法看到LDAP引用但仍能够对它们进行ldapsearch

时间:2014-01-04 00:02:40

标签: openldap

我在网络上设置了两个OpenLDAP服务器,并尝试通过LDAP启用身份验证。如果用户在本地LDAP服务器上进行了身份验证,我可以登录到我的服务器。但是,在我将引用对象添加到另一个服务器后,我无法通过phpldapadmin查看该对象。这是我在ldapadd中添加的内容。

dn: uid=server2,ou=People,dc=example,dc=com
objectClass: referral
objectClass: extensibleObject
cn: server2
ref: ldap://192.168.4.105/ou=People,dc=server2,dc=example,dc=com

它成功添加但我无法通过phpldapadmin看到它。我可以通过ldapsearch查看这是我得到的。

$ ldapsearch -h 192.168.4.106 -x -b "uid=server2,ou=People,dc=example,dc=com"
# extended LDIF
#
# LDAPv3
# base <uid=server2,ou=People,dc=example,dc=com> with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#

# search result
search: 2
result: 10 Referral
matchedDN: uid=server2,ou=People,dc=example,dc=com
ref: ldap://192.168.4.106/ou=People,dc=server2,dc=example,dc=com??sub

我无法看到这些物品并且他们不能让我访问另一台服务器,这让我疯狂。我安装了nss_ldap和pam_ldap以及phpldapadmin模块。我在两台服务器上运行Ubuntu 13.04。这是我的客户端的slapd.conf。

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

allow bind_v2
# 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://server2.example.com:389

pidfile         /usr/share/slapd/var/run/slapd.pid
argsfile        /usr/share/slapd/var/run/slapd.args

# Load dynamic backend modules:
# modulepath     /usr/local/libexec/openldap
moduleload    back_bdb.la
# moduleload    back_hdb.la
moduleload    back_ldap.la
# 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

overlay                    chain
chain-max-depth 1 #allows 1 referral hop 
chain-uri                  "ldap://192.168.4.106"
chain-rebind-as-user       yes
chain-idassert-bind        bindmethod="simple"
                           binddn="cn=admin,dc=example,dc=com"
                           credentials="{SSHA}****"
                           mode="self"
chain-tls                  start
chain-idassert-authzFrom   "*"
chain-return-error         TRUE

# 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!

#######################################################################
# BDB database definitions
#######################################################################

database        bdb
suffix          "dc=server2,dc=example,dc=com"
rootdn          "cn=admin,dc=server2,dc=example,dc=com"
# Cleartext passwords, especially for the rootdn, should
# be avoid.  See slappasswd(9) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
rootpw          {SSHA}*********
defaultaccess   none

# The database directory MUST exist prior to running slapd AND 
# should only be accessible by the slapd and slap tools.
# Mode 700 recommended.
directory       /usr/local/var/openldap-data
# Indices to maintain
index   objectClass     eq

如果有人能指出我的问题方向,我将非常感激。我不确定这是否相关,但我无法通过Apache Directory Studio查看我的OpenLDAP服务器,但我可以通过phpldapadmin查看。

的ldap.conf

host 192.168.4.105
base dc=server2,dc=example,dc=com
uri ldap://192.168.4.105
ldap_version 3
rootbinddn cn=admin,dc=server2,dc=example,dc=com
rootpw {SSHA}blah
scope sub
timelimit 5
bind_timelimit 5
pam_filter objectclass=posixAccount
pam_login_attribute uid
pam_member_attribute memberuid
pam_password exop
nss_base_passwd         ou=People,dc=server2,dc=example,dc=com?sub
nss_base_shadow         ou=People,dc=server2,dc=example,dc=com?sub
nss_base_group          ou=Group,dc=server2,dc=example,dc=com?sub
nss_base_hosts          ou=Hosts,dc=server2,dc=example,dc=com?sub
nss_initgroups_ignoreusers backup,bin,daemon,games,gnats,irc,landscape,libuuid,list,lp,mail,man,messagebus,news,nslcd,openldap,proxy,root,sshd,statd,sync,sys,syslog,uucp,whoopsie,www-data

0 个答案:

没有答案