从服务器updatedn
时间: 2023-08-10 09:08:59 浏览: 36
在OpenLDAP中,updatedn是指在从服务器上用于同步更新的账号。当主服务器在同步更新到从服务器时,会使用updatedn账号进行身份验证并执行更新操作。如果updatedn账号没有足够的权限,同步更新操作将会失败。
在OpenLDAP中,可以使用以下命令来设置updatedn账号:
```
ldapmodify -Y EXTERNAL -H ldapi:/// -f updatedn.ldif
```
其中,updatedn.ldif文件内容如下:
```
dn: olcDatabase={1}hdb,cn=config
changetype: modify
add: olcAccess
olcAccess: {0}to * by dn="cn=updatedn,dc=example,dc=com" write by * read
-
add: olcDbUpdatedn
olcDbUpdatedn: cn=updatedn,dc=example,dc=com
-
add: olcDbUpdateRef
olcDbUpdateRef: ldap://ldap.example.com
```
上述配置中,olcDbUpdatedn指定了updatedn账号的DN,olcDbUpdateRef指定了主服务器的地址,olcAccess则指定了updatedn账号的权限,其中{0}to * by dn="cn=updatedn,dc=example,dc=com" write by * read表示updatedn账号拥有对所有条目的写权限,其他用户只有读权限。
需要注意的是,在使用updatedn账号同步更新时,需要确保updatedn账号在主服务器和从服务器上都存在,并且密码一致。同时,updatedn账号的密码需要加密存储,可以使用slappasswd命令生成加密后的密码。