1
    try {
        LDAPResult result = getConnection().modify(
                 "dn: cn=jacob.kranz,cn=example,cn=com",
                 "changetype: modify",
                 "replace: forgotPasswordAttribute",
                 "forgotPasswordAttribute: testValueForNewAttribute");
    } catch (LDIFException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } catch (LDAPException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }

我想为给定条目添加 forgotPassword 属性。根据 UnboundId 文档(在此处找到),在进行替换时(请参阅参数 3),如果该属性尚不存在,它将创建该属性。但是,我不断收到错误消息forgotPassword: attribute type undefined

4

1 回答 1

0

如果条目还没有该属性,则替换修改类型将向条目添加一个属性,但该属性类型需要在模式中定义并由条目中包含的对象类允许。

于 2014-09-17T19:58:05.667 回答