我不确定如何通过 UnboundID 正确传递 OpenLDAP 插入所需的多个属性。我省略了 objectClass 属性并收到“no objectClass”错误。我还尝试了逗号分隔和括号/数组路由,如下所示并收到“值 #0 每个语法无效”错误。
String[] ldifLines = {"dn: ou=users,dc=sub,dc=domain,dc=com", "cn: " + uid, "userPassword: " + pw, "description: user", "uidNumber: " + lclDT, "gidNumber: 504", "uid: " + uid, "homeDirectory: " + File.separator + "home" + File.separator + this.getStrippedUser(), "objectClass: {posixAccount, top}"};
LDAPResult ldapResult = lclLC.add(new AddRequest(ldifLines));
那么,问题来了,如何在上面包含的字符串数组中成功传递这些objectClass属性呢?同样,我也尝试过:“objectClass:top,posixAccount”。提前致谢!