此过程将为单个用户帐户指定现有的密码策略。
要完成此过程,您必须具有要指定的专用密码策略。请参见创建密码策略。
可使用 DSCC 执行此任务。有关信息,请参见目录服务控制中心界面和 DSCC 联机帮助。
如果没有特殊说明,此处显示的示例数据均来自 Example.ldif。
将密码策略 DN 添加到用户条目的 pwdPolicySubentry 属性值。
例如,以下命令将创建密码策略中定义的密码策略指定给 David Miller 条目(其 DN 为 uid=dmiller,ou=people,dc=example,dc=com):
$ cat pwp.ldif dn: uid=dmiller,ou=people,dc=example,dc=com changetype: modify add: pwdPolicySubentry pwdPolicySubentry: cn=TempPolicy,dc=example,dc=com $ ldapmodify -D uid=kvaughan,ou=people,dc=example,dc=com -w - -f pwp.ldif Enter bind password: modifying entry uid=dmiller,ou=people,dc=example,dc=com $ ldapsearch -D uid=kvaughan,ou=people,dc=example,dc=com -w - -b dc=example,dc=com \ "(uid=dmiller)" pwdPolicySubentry Enter bind password: version: 1 dn: uid=dmiller, ou=People, dc=example,dc=com pwdPolicySubentry: cn=TempPolicy,dc=example,dc=com $ |
如 Example.ldif 中所示,kvaughan 是具有 dc=example,dc=com 条目修改权限的人力资源经理。Vaughan 的绑定密码(如 Example.ldif 中所示)为 bribery。