4.2. 使用命令行将实例切换到只读模式
此流程指导您在命令行中将 Directory 服务器实例切换为只读模式。
流程
在
上
,将nsslapd-readonly
参数设置为 :Copy to Clipboard Copied! Toggle word wrap Toggle overflow dsconf -D "cn=Directory Manager" ldap://server.example.com config replace nsslapd-readonly=on
# dsconf -D "cn=Directory Manager" ldap://server.example.com config replace nsslapd-readonly=on
验证
尝试对目录的写入操作,例如:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow ldapmodify -D "cn=Directory Manager" -W -H ldap://server.example.com -x
# ldapmodify -D "cn=Directory Manager" -W -H ldap://server.example.com -x dn: dc=example,dc=com changetype: modify add: description description: foo
服务器应拒绝执行。
Copy to Clipboard Copied! Toggle word wrap Toggle overflow modifying entry "dc=example,dc=com" ldap_modify: Server is unwilling to perform (53) additional info: Server is read-only
modifying entry "dc=example,dc=com" ldap_modify: Server is unwilling to perform (53) additional info: Server is read-only
其他资源