大网数据广告活动
服务器运维问答

OpenLDAP chain overlay configuration

· 52CE 我爱测

I'm trying to get OpenLDAP's chain overlay to work, but unfortunately, the documentation is rather sparse. I'm using the OpenLDAP version 2.4.39 packages that come with RHEL 6, and the LDAP master and slave are using TLS to commu…

问题原文

原帖链接 · paul88888 · CC BY-SA 3.0

I'm trying to get OpenLDAP's chain overlay to work, but unfortunately, the documentation is rather sparse.

I'm using the OpenLDAP version 2.4.39 packages that come with RHEL 6, and the LDAP master and slave are using TLS to communicate. The TLS certs and keys are stored with Mozilla NSS, so the tls_certdir and tls_cert statements below should be correct (they definitely work in this form for replication).

My configuration (in slapd.conf form, which I convert to OLC notation before using) is:

overlay chain
chain-uri              ldap://my.ldap.master.example.com
chain-rebind-as-user   FALSE
chain-idassert-bind    bindmethod="simple"
                       binddn="cn=Manager,dc=example,dc=com"
                       credentials="xxxxxxxxxxxxxxxx"
                       mode="self"
                       starttls=yes
                       tls_reqcert=demand
                       tls_cacertdir=/etc/openldap/certs
                       tls_cert=my.ldap.slave.example.com
chain-tls              start tls_reqcert=demand tls_cacertdir=/etc/openldap/certs tls_cert=my.ldap.slave.example.com
chain-return-error     TRUE

[...syncrepl...]

updateref       ldap://my.ldap.master.example.com

I want to get this working so that policy updates get forwarded onto the master (eg, when someone gets their password wrong five times or more, the slave will send the pwdAccountLockedTime to the master, rather than storing it locally). I have ppolicy_forward_updates set in the config file, for this purpose.

I have tested this and am not seeing any traffic going to the LDAP master when I make changes on the slave.

Does anyone know what I'm doing wrong here?

已采纳解答

原帖链接 · bodgit · CC BY-SA 3.0

You need to make sure the chain overlay is configured on the frontend database and not the hdb/mdb/bdb database. So in your cn=config database you should end up with the following entries:

  • olcDatabase={-1}frontend,cn=config
  • olcOverlay={0}chain,olcDatabase={-1}frontend,cn=config
  • olcDatabase={0}ldap,olcOverlay={0}chain,olcDatabase={-1}frontend,cn=config

I had the same problem where I had configured the overlay on the main hdb database and had the same symptoms where there was no traffic from the slave to the master. As soon as I re-parented the overlay and its database to the frontend database it started to work.

You may also need to configure the olcAuthzPolicy attribute on the master server.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-08-08)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。