2013-02-22 63 views
0

我已经使用了slapd.conf和slurpd的配置主/从更改密码。LDAP密码信息更新失败:推荐无法从副本

的问题是我不能够,如果主服务器停止从从属服务器更改客户端密码。

主服务器 -

[[email protected] ~]# service ldap stop 
Stopping slapd:           [ OK ] 
Stopping slurpd:           [ OK ] 
[[email protected] ~]# 

从属服务器 -

[[email protected] ldap]# service ldap restart 
Stopping slapd:           [ OK ] 
Checking configuration files for slapd: config file testing succeeded 
                  [ OK ] 
Starting slapd:           [ OK ] 
[[email protected] ldap]# 

客户端 -

[[email protected] ldap]# ssh [email protected] 
[email protected]'s password: 
Last login: Tue Feb 19 21:14:27 2013 from lr5dir02.hk.intraxa 
Could not chdir to home directory /home/ldaptest: No such file or directory 
-bash-3.2$ 

-bash-3.2$ passwd 
Changing password for user ldaptest. 
Enter login(LDAP) password: 
'New UNIX password: 
Retype new UNIX password: 
LDAP password information update failed: Referral 

passwd: Permission denied 
-bash-3.2$ 

主服务器 - slapd.conf中

access to attrs=shadowLastChange,userPassword 
     by self write 
     by * auth 

access to * 
     by * read 

replica host=10.40.101.231:389 
     binddn="cn=Manager,dc=hk,dc=intraxa" 
     credentials=secret 
     bindmethod=simple 
     tls=no 

从服务器的slapd.conf - 同法师只有

updatedn "cn=Manager,dc=hk,dc=intraxa" 
updateref ldap://10.40.101.230:389/ 

客户帕姆 -

[[email protected] ~]# more /etc/pam.d/passwd 
#%PAM-1.0 
auth  include  system-auth 
account include  system-auth 
password include  system-auth 

[[email protected] ~]# 


Log - Feb 19 21:43:54 lr5dir02 slapd[7147]: daemon: read active on 14 
Feb 19 21:43:54 lr5dir02 slapd[7147]: daemon: epoll: listen=7 active_threads=0 tvp=NULL 
Feb 19 21:43:54 lr5dir02 slapd[7147]: conn=2 op=4 BIND dn="uid=ldaptest,ou=People,dc=hk,dc=intraxa" method=128 
Feb 19 21:43:54 lr5dir02 slapd[7147]: conn=2 op=4 BIND dn="uid=ldaptest,ou=People,dc=hk,dc=intraxa" mech=SIMPLE ssf=0 
Feb 19 21:43:54 lr5dir02 slapd[7147]: conn=2 op=4 RESULT tag=97 err=0 text= 
Feb 19 21:43:54 lr5dir02 slapd[7147]: daemon: activity on 1 descriptor 
Feb 19 21:43:54 lr5dir02 slapd[7147]: daemon: activity on: 
Feb 19 21:43:54 lr5dir02 slapd[7147]: 
Feb 19 21:43:54 lr5dir02 slapd[7147]: daemon: epoll: listen=7 active_threads=0 tvp=NULL 
Feb 19 21:43:54 lr5dir02 slapd[7147]: daemon: activity on 1 descriptor 
Feb 19 21:43:54 lr5dir02 slapd[7147]: daemon: activity on: 
Feb 19 21:43:54 lr5dir02 slapd[7147]: 14r 
Feb 19 21:43:54 lr5dir02 slapd[7147]: 
Feb 19 21:43:54 lr5dir02 slapd[7147]: daemon: read active on 14 
Feb 19 21:43:54 lr5dir02 slapd[7147]: daemon: epoll: listen=7 active_threads=0 tvp=NULL 
Feb 19 21:43:54 lr5dir02 slapd[7147]: daemon: activity on 1 descriptor 
Feb 19 21:43:54 lr5dir02 slapd[7147]: daemon: activity on: 
Feb 19 21:43:54 lr5dir02 slapd[7147]: 
Feb 19 21:43:54 lr5dir02 slapd[7147]: daemon: epoll: listen=7 active_threads=0 tvp=NULL 
Feb 19 21:43:54 lr5dir02 slapd[7147]: conn=2 op=5 MOD dn="uid=ldaptest,ou=People,dc=hk,dc=intraxa" 
Feb 19 21:43:54 lr5dir02 slapd[7147]: conn=2 op=5 MOD attr=userPassword 
Feb 19 21:43:54 lr5dir02 slapd[7147]: conn=2 op=5 RESULT tag=103 err=10 text= 
Feb 19 21:43:56 lr5dir02 slapd[7147]: daemon: activity on 1 descriptor 
Feb 19 21:43:56 lr5dir02 slapd[7147]: daemon: activity on: 
Feb 19 21:43:56 lr5dir02 slapd[7147]: 14r 
Feb 19 21:43:56 lr5dir02 slapd[7147]: 
Feb 19 21:43:56 lr5dir02 slapd[7147]: daemon: read active on 14 
Feb 19 21:43:56 lr5dir02 slapd[7147]: daemon: epoll: listen=7 active_threads=0 tvp=NULL 
Feb 19 21:43:56 lr5dir02 slapd[7147]: connection_read(14): input error=-2 id=2, closing. 
Feb 19 21:43:56 lr5dir02 slapd[7147]: conn=2 op=6 UNBIND 
Feb 19 21:43:56 lr5dir02 slapd[7147]: daemon: removing 14 
Feb 19 21:43:56 lr5dir02 slapd[7147]: conn=2 fd=14 closed 
Feb 19 21:43:56 lr5dir02 slapd[7147]: daemon: activity on 1 descriptor 
Feb 19 21:43:56 lr5dir02 slapd[7147]: daemon: activity on: 
Feb 19 21:43:56 lr5dir02 slapd[7147]: 
Feb 19 21:43:56 lr5dir02 slapd[7147]: daemon: epoll: listen=7 active_threads=0 tvp=NUL 

回答

1

如果您正在使用slurpd,您必须使用旧版本的OpenLDAP - 支持复制配置严格单主机(RW),只读副本节点。 slurpd是不再支持,部分原因是因为它只能支持这种模式。

发生了什么事是只读节点都知道它不能接受一个写请求(不是从主设备以外),所以它给人一种转诊到客户端,发送到可写节点(即到updateref URI在你的配置中)。

您应该升级到OpenLDAP 2.4,并使用syncrepl协议进行复制。这允许三个复制方案:

  1. 单RW主,多个RO副本节点
  2. 充分多主RW(与一些注意事项)
  3. mirrormode杂交体(活性热备用),使用平衡器或代理

可以使用的syncrepl与OpenLDAP的2.3,但我强烈建议升级(或者你可能会在最多5年增强和修补程序的缺失出来的syncrepl,这取决于你正在使用以及是否有任何修复哪些软件包哈已经被移植了)。

与您当前设立的唯一方法是手动改变RO节点的配置,以促进它掌握在主人下线时,你可以猜测这可能是有问题的维护。

+0

谢谢Spuratic先生,是的,我还想到upgarde到的syncrepl,其实我得到这个项目的其他球队和他们使用的slapd.conf/slurpd的只有认证的目的想简单的LDAP。再次感谢。我可以使用的syncrepl与slapd.conf中,我不想CN = config配置。是否可以使用syncrepl和slapd.conf配置。 – Naveen 2013-03-07 08:50:03