centos 5.x 和 ldap 故障转移

centos 5.x 和 ldap 故障转移

我在 LDAP 身份验证故障转移方面遇到了麻烦。我们目前有两个 CentOS-DS 目录服务器在多主设置中工作。每个站点一个服务器。通常,登录过程正常。但是,我在故障转移部分遇到了麻烦。如果 ldap_SiteA.domain.local 发生故障,则该位置上通常首先指向该位置的所有服务器都不会查看第二个条目:ldap_siteB.domain.local。

我们使用 ldap 进行登录和 Sudo。这是我在站点 A 中运行的 CentOS 5.6 服务器上的 /etc/ldap.conf 副本。(对于站点 B,服务器的顺序是相反的)

这是我编写的通过 LDAP 进行身份验证的脚本的一部分:

authconfig --enableldap --enableldapauth --enablemkhomedir --ldapserver=ldap_siteA.domain.local,ldap_siteB.domain.local --ldapbasedn="dc=domain,dc=local" --update
echo 'sudoers:    files ldap' >> /etc/nsswitch.conf
echo 'base dc=domain,dc=local
timelimit 15
bind_policy soft
bind_timelimit 30
idle_timelimit 30
uri ldaps://ldap_siteA.domain.local/ 
uri ldaps://ldap_siteB.domain.local/
ssl yes
tls_checkpeer no
pam_password clear
#debug used for troubleshooting
#sudoers_debug 2
sudoers_base    ou=SUDOers,dc=domain,dc=local
' > /etc/ldap.conf

我是否遗漏了某些东西,导致故障转移无法正常工作?另外,我们似乎有几个主机喜欢向 ldap 服务器发起大量连接。我应该为此更好地调整超时吗?使用 NSCD 服务?还是两者兼而有之?

谢谢!

答案1

uri ldaps://ldap_siteA.domain.local/ ldaps://ldap_siteB.domain.local/

有限的本地副本比 nscd 更好,但设置起来更复杂。
如果您使用 ldap 作为 uid/gid,最好使用其中一个。
ls -l /home/会很吵。

相关内容