OpenLDAP olcMirrorMode

发布于 11-25 20:35 字数 263 浏览 3 评论 0原文

我正在尝试使用 Openldap 动态配置。当我尝试添加以下内容时,显示错误:

add: olcMirrorMode
olcMirrorMode: TRUE

error(80)
additional info: <olcMirrorMode> database is not a shadow

任何人都可以解释如何消除此错误以及我需要设置什么才能在守护程序配置中添加 olcMirrorMode 吗?

谢谢 :-)

I am trying to use the Openldap dynamic configuration. I have an error being displayed as I try and add in the following :

add: olcMirrorMode
olcMirrorMode: TRUE

error(80)
additional info: <olcMirrorMode> database is not a shadow

Can anyone explain how to rid this error and what I need setup in order for the olcMirrorMode to be added in the daemon configuration?

Thanks :-)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

随心而道2024-12-02 20:35:25

我也遇到了类似的问题,所以希望这会有所帮助。

Mirrormode 只能在您想要复制的数据库上设置,并且 olcMirrorMode 应该在您设置任何和所有syncrepl 命令之后设置。

假设您尝试执行 n-master 复制
设置你的syncrepl 语句。

完成后打开镜像模式。对我来说,问题是我必须进行修改/添加而不是直接添加才能使其接受镜像模式:

dn: olcDatabase={1}bdb,cn=config     
changetype: modify 
add: olcMirrorMode 
olcMirrorMode: TRUE

I had similar problems, so hopefully this might help.

Mirrormode should be set up only on databases that you want to replicate, and the olcMirrorMode should be set after you've set up any and all syncrepl commands.

Assuming you're trying to do n-master replication
Set up your syncrepl statments.

Once thats done turn on mirrormode. The catch for me was that I had to do a modify/add rather than a straight add to get it to accept mirrormode:

dn: olcDatabase={1}bdb,cn=config     
changetype: modify 
add: olcMirrorMode 
olcMirrorMode: TRUE
蓝色星空2024-12-02 20:35:25

在第一个服务器上配置 OpenLDAP,如下所示。

[root@dhcp200 ~]# cat /etc/openldap/slapd.conf |grep -v '^#' |grep -v '^

在第二台服务器中配置 slapd.conf,如下所示。

[root@test6 ~]# cat /etc/openldap/slapd.conf |grep -v '^#' |grep -v '^

如果要使用 cn=config 方法,请

# rm -rvf /etc/openldap/slapd.d/
# mkdir /etc/openldap/slapd.d/
# slaptest -f slapd.conf -F /etc/openldap/slapd.d/
# rm slapd.conf
# chown -R ldap:ldap /etc/openldap/slapd.d/

在两台服务器上使用 slapd 的 Start 服务将其转换为 cn=config 格式。

# service slapd start
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/ppolicy.schema allow bind_v2 pidfile /var/run/openldap/slapd.pid argsfile /var/run/openldap/slapd.args modulepath /usr/lib64/openldap moduleload syncprov.la loglevel sync database bdb suffix "dc=example,dc=com" rootdn "cn=Manager,dc=example,dc=com" rootpw secret directory /var/lib/ldap 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 index entryCSN eq index entryUUID eq serverID 2 syncrepl rid=001 provider=ldap://192.168.122.204:389 bindmethod=simple binddn="cn=Manager,dc=example,dc=com" credentials=secret searchbase="dc=example,dc=com" attrs=",+" schemachecking=off type=refreshAndPersist retry="1 +" mirrormode TRUE overlay syncprov syncprov-checkpoint 100 10 syncprov-sessionlog 100

在第二台服务器中配置 slapd.conf,如下所示。

 

如果要使用 cn=config 方法,请

 

在两台服务器上使用 slapd 的 Start 服务将其转换为 cn=config 格式。



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/ppolicy.schema
allow bind_v2
pidfile     /var/run/openldap/slapd.pid
argsfile    /var/run/openldap/slapd.args
modulepath  /usr/lib64/openldap
moduleload  syncprov.la
loglevel sync
database    bdb
suffix      "dc=example,dc=com"
rootdn      "cn=Manager,dc=example,dc=com"
rootpw      secret
directory   /var/lib/ldap
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
index entryCSN              eq
index entryUUID             eq
serverID 1
syncrepl      rid=001
              provider=ldap://192.168.122.200:389
              bindmethod=simple
              binddn="cn=Manager,dc=example,dc=com"
              credentials=secret
              searchbase="dc=example,dc=com"
              attrs=",+"
              schemachecking=off
              type=refreshAndPersist
              retry="1 +"
mirrormode TRUE
overlay syncprov
syncprov-checkpoint 100 10
syncprov-sessionlog 100

如果要使用 cn=config 方法,请

在两台服务器上使用 slapd 的 Start 服务将其转换为 cn=config 格式。

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/ppolicy.schema allow bind_v2 pidfile /var/run/openldap/slapd.pid argsfile /var/run/openldap/slapd.args modulepath /usr/lib64/openldap moduleload syncprov.la loglevel sync database bdb suffix "dc=example,dc=com" rootdn "cn=Manager,dc=example,dc=com" rootpw secret directory /var/lib/ldap 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 index entryCSN eq index entryUUID eq serverID 2 syncrepl rid=001 provider=ldap://192.168.122.204:389 bindmethod=simple binddn="cn=Manager,dc=example,dc=com" credentials=secret searchbase="dc=example,dc=com" attrs=",+" schemachecking=off type=refreshAndPersist retry="1 +" mirrormode TRUE overlay syncprov syncprov-checkpoint 100 10 syncprov-sessionlog 100

在第二台服务器中配置 slapd.conf,如下所示。

如果要使用 cn=config 方法,请

在两台服务器上使用 slapd 的 Start 服务将其转换为 cn=config 格式。

Configure OpenLDAP like below on first Server.

[root@dhcp200 ~]# cat /etc/openldap/slapd.conf |grep -v '^#' |grep -v '^

Configure slapd.conf like below in Second server.

[root@test6 ~]# cat /etc/openldap/slapd.conf |grep -v '^#' |grep -v '^

If you want to use cn=config method, then convert it to cn=config format using

# rm -rvf /etc/openldap/slapd.d/
# mkdir /etc/openldap/slapd.d/
# slaptest -f slapd.conf -F /etc/openldap/slapd.d/
# rm slapd.conf
# chown -R ldap:ldap /etc/openldap/slapd.d/

Start service of slapd on both servers.

# service slapd start
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/ppolicy.schema allow bind_v2 pidfile /var/run/openldap/slapd.pid argsfile /var/run/openldap/slapd.args modulepath /usr/lib64/openldap moduleload syncprov.la loglevel sync database bdb suffix "dc=example,dc=com" rootdn "cn=Manager,dc=example,dc=com" rootpw secret directory /var/lib/ldap 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 index entryCSN eq index entryUUID eq serverID 2 syncrepl rid=001 provider=ldap://192.168.122.204:389 bindmethod=simple binddn="cn=Manager,dc=example,dc=com" credentials=secret searchbase="dc=example,dc=com" attrs=",+" schemachecking=off type=refreshAndPersist retry="1 +" mirrormode TRUE overlay syncprov syncprov-checkpoint 100 10 syncprov-sessionlog 100

Configure slapd.conf like below in Second server.

 

If you want to use cn=config method, then convert it to cn=config format using

 

Start service of slapd on both servers.



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/ppolicy.schema
allow bind_v2
pidfile     /var/run/openldap/slapd.pid
argsfile    /var/run/openldap/slapd.args
modulepath  /usr/lib64/openldap
moduleload  syncprov.la
loglevel sync
database    bdb
suffix      "dc=example,dc=com"
rootdn      "cn=Manager,dc=example,dc=com"
rootpw      secret
directory   /var/lib/ldap
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
index entryCSN              eq
index entryUUID             eq
serverID 1
syncrepl      rid=001
              provider=ldap://192.168.122.200:389
              bindmethod=simple
              binddn="cn=Manager,dc=example,dc=com"
              credentials=secret
              searchbase="dc=example,dc=com"
              attrs=",+"
              schemachecking=off
              type=refreshAndPersist
              retry="1 +"
mirrormode TRUE
overlay syncprov
syncprov-checkpoint 100 10
syncprov-sessionlog 100

If you want to use cn=config method, then convert it to cn=config format using

Start service of slapd on both servers.

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/ppolicy.schema allow bind_v2 pidfile /var/run/openldap/slapd.pid argsfile /var/run/openldap/slapd.args modulepath /usr/lib64/openldap moduleload syncprov.la loglevel sync database bdb suffix "dc=example,dc=com" rootdn "cn=Manager,dc=example,dc=com" rootpw secret directory /var/lib/ldap 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 index entryCSN eq index entryUUID eq serverID 2 syncrepl rid=001 provider=ldap://192.168.122.204:389 bindmethod=simple binddn="cn=Manager,dc=example,dc=com" credentials=secret searchbase="dc=example,dc=com" attrs=",+" schemachecking=off type=refreshAndPersist retry="1 +" mirrormode TRUE overlay syncprov syncprov-checkpoint 100 10 syncprov-sessionlog 100

Configure slapd.conf like below in Second server.

If you want to use cn=config method, then convert it to cn=config format using

Start service of slapd on both servers.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文