4.2. 在 .dsrc 文件中为复制监控设置凭证
默认情况下,dsconf 复制监控
命令在向远程实例进行身份验证时要求绑定 DN 和密码。要更快、更轻松地生成报告,您可以为用户 ~/.dsrc
文件中的拓扑中的每个服务器设置绑定 DN 以及可选的密码。
先决条件
- 主机是复制拓扑的成员。
- 您初始化了消费者。
流程
-
可选:创建
~/.dsrc
文件。 在
~/.dsrc
文件中,设置绑定 DN 和密码。例如:[repl-monitor-connections] connection1 = server1.example.com:389:cn=Directory Manager:* connection2 = server2.example.com:389:cn=Directory Manager:[~/pwd.txt] connection3 = hub1.example.com:389:cn=Directory Manager:S3cret
[repl-monitor-connections] connection1 = server1.example.com:389:cn=Directory Manager:* connection2 = server2.example.com:389:cn=Directory Manager:[~/pwd.txt] connection3 = hub1.example.com:389:cn=Directory Manager:S3cret
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 本例使用 connection1 连接到 connection3,作为每个条目的键。但是,您可以使用任何唯一的键。
运行
dsconf 复制 monitor
命令时,dsconf
实用程序将连接到在实例复制协议中配置的所有服务器。如果工具在~/.dsrc
中找到主机名,它将使用定义的凭证向远程服务器进行身份验证。在上例中,dsconf
在连接到服务器时使用以下凭证:Expand Hostname 绑定 DN 密码设置方法 server1.example.com
cn=Directory Manager
请求密码
server2.example.com
cn=Directory Manager
从
~/pwd.txt
读取密码hub1.example.com
cn=Directory Manager
S3cret
验证
-
运行
dsconf replication monitor
命令,以查看dsconf
工具使用~/.dsrc
文件中配置的凭证。如需更多信息,请参阅