免费注册 查看新帖 |

Chinaunix

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

[ldap] LDAP认证怪现象 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-11-24 14:20 |只看该作者 |倒序浏览
现在我有几十台linux 机器(centos4和centos5),普通用户通过openldap认证登陆,root是本地帐户认证。
平时运行都很正常,但ldap server连不上时,按理讲此时root应该可以登陆,但事实上root有时不能登陆,只能重启到单用户模式下将认证方式改为本地认证才行。
/etc/nsswitch.conf文件中
passwd:     files ldap
shadow:     files ldap
group:      files ldap

所以想不明白为什么会出现这种情况。
有人遇到过这种现象吗?

论坛徽章:
0
2 [报告]
发表于 2009-11-24 14:58 |只看该作者
把 /ETC/LDAP.CONF  
   SLDAP.CONFIG
    pam模块配置
贴出来 一起看一下。

我调试 LDAP.CONF的时候出过这问题, 还有我在ldap里也设置了一个root  也出过 哈哈!

论坛徽章:
0
3 [报告]
发表于 2009-11-25 11:33 |只看该作者
/etc/ldap.conf
uri ldaps://web:636/web
base dc=test,dc=com
pam_password md5
ssl start_tls
ssl on
tls_checkpeer yes
tls_cacertfile /etc/openldap/cacerts/cacert.pem
#tls_cacertdir /etc/openldap/cacerts
pam_filter host=zj-jgg01
host web

sldap.conf
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/misc.schema
include         /etc/openldap/schema/ppolicy.schema

allow bind_v2
loglevel 0

pidfile         /var/run/openldap/slapd.pid
argsfile        /var/run/openldap/slapd.args

# Load dynamic backend modules:
modulepath      /usr/lib/openldap
moduleload ppolicy.la

#TLSCipherSuite HIGH::MEDIUM:LOW
TLSCipherSuite HIGH:MEDIUM:+SSLv2:+SSLv3
TLSCACertificateFile /etc/openldap/cacerts/cacert.pem
TLSCertificateFile /etc/openldap/cacerts/servercrt.pem
TLSCertificateKeyFile /etc/openldap/cacerts/serverkey.pem
TLSVerifyClient allow


access to attrs=userPassword
        by self write
        by * auth
access to *
        by * read
#
# rootdn can always read and write EVERYTHING!

#######################################################################
# ldbm and/or bdb database definitions
#######################################################################

database        bdb
suffix          "dc=test,dc=com"
rootdn          "cn=Manager,dc=test,dc=com"
rootpw          test.com&2007

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


overlay ppolicy
ppolicy_default "cn=default,ou=Policies,dc=test,dc=com"
#ppolicy_use_lockout

#openldap slave server
updatedn "cn=Manager,dc=test,dc=com"
updateref ldaps://gw1:636


pam模块system-auth
#%PAM-1.0
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth        required      pam_env.so
auth        sufficient    pam_unix.so nullok try_first_pass
auth        requisite     pam_succeed_if.so uid >= 500 quiet
auth        sufficient    pam_ldap.so use_first_pass
auth        required      pam_deny.so

account     required      pam_unix.so broken_shadow
account     sufficient    pam_succeed_if.so uid < 500 quiet
account     [default=bad success=ok user_unknown=ignore] pam_ldap.so
account     required      pam_permit.so

password    requisite     pam_cracklib.so try_first_pass retry=3
password    sufficient    pam_unix.so md5 shadow nullok try_first_pass use_authtok
password    sufficient    pam_ldap.so use_authtok
password    required      pam_deny.so

session     optional      pam_keyinit.so revoke
session     required      pam_limits.so
session     [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid
session     required      pam_unix.so
session     optional      pam_ldap.so
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP