OpenLDAP 2.6.4 主服务配置示例 - 使用 syncrepl 同步模式
以下是一个基本的 OpenLDAP 2.6.4 主服务配置示例,使用 syncrepl 同步模式:
# Define the global options
include /etc/openldap/schema/core.schema
pidfile /var/run/openldap/slapd.pid
argsfile /var/run/openldap/slapd.args
# Define the database
database mdb
suffix 'dc=example,dc=com'
rootdn 'cn=admin,dc=example,dc=com'
rootpw {SSHA}yourpassword
directory /var/lib/openldap-data
checkpoint 1024 15
# Define the replication settings
overlay syncprov
syncprov-checkpoint 100 10
syncprov-sessionlog 100
# Define the syncrepl provider settings
syncrepl rid=001
provider=ldap://provider.example.com
type=refreshAndPersist
retry='60 +'
searchbase='dc=example,dc=com'
bindmethod=simple
binddn='cn=admin,dc=example,dc=com'
credentials='yourpassword'
schemachecking=off
tls_cacert=/etc/ssl/certs/ca-certificates.crt
# Define the access controls
access to *
by dn.base='cn=admin,dc=example,dc=com' write
by * read
这个示例配置文件中包含以下部分:
- 全局选项:定义 OpenLDAP 的全局选项,例如使用的模式和 PID 文件的位置。
- 数据库定义:定义使用的数据库类型、根 DN 和密码、数据目录和检查点设置。
- 复制设置:定义使用的 syncrepl 同步模式和提供者服务器的设置。
- 访问控制:定义对数据的访问控制规则,例如允许管理员写入并允许所有人读取。
请注意,这只是一个基本示例,您需要根据您的实际需求进行适当的调整。特别是,您需要根据您的环境配置 syncrepl 提供者和访问控制规则。
原文地址: https://www.cveoy.top/t/topic/l4yT 著作权归作者所有。请勿转载和采集!