java LDAP OperationNotSupportedException:错误代码 53 - WILL_NOT_PERFORM
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17290539/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
LDAP OperationNotSupportedException : error code 53 - WILL_NOT_PERFORM
提问by ANU
when I create a user using JNDI to communicate to active directory , I am now getting LDAP Error 53 (WILL_NOT_PERFORM)
.
当我创建一个使用 JNDI 与活动目录通信的用户时,我现在得到LDAP Error 53 (WILL_NOT_PERFORM)
.
I'm trying set password for the created user. Also I've disabled the 'User must change password at next logon' option.
我正在尝试为创建的用户设置密码。我还禁用了“用户下次登录时必须更改密码”选项。
attrs.put("unicodePwd", "\"Test123\"".getBytes("UTF-16LE") );
String newValue = Integer.toString(-1);
ModificationItem mods[] = new ModificationItem[2];
mods[0] = new ModificationItem(DirContext.REMOVE_ATTRIBUTE,
new BasicAttribute("pwdLastSet"));
mods[1] = new ModificationItem(DirContext.ADD_ATTRIBUTE,
new BasicAttribute("pwdLastSet",
newValue));
ctx.modifyAttributes(userName, mods);
Problem creating object:
创建对象的问题:
javax.naming.OperationNotSupportedException: [LDAP: error code 53 - 0000001F: SvcErr: DSID-031A0FC0, problem 5003 (WILL_NOT_PERFORM), data 0
Any ideas as to what I am doing wrong or missing?
关于我做错了什么或遗漏了什么的任何想法?
回答by snookerdoodle
You don't show how you're connecting to the Active Directory server, but you will get this error if you try to set a password over a connection that is not SSL/TLS.
您没有显示您如何连接到 Active Directory 服务器,但如果您尝试通过非 SSL/TLS 的连接设置密码,您将收到此错误。
Currently the URL to your A/D server probably looks like this:
目前,您的 A/D 服务器的 URL 可能如下所示:
ldap://(server address):389
ldap://(服务器地址):389
Try changing it to:
尝试将其更改为:
ldaps://(server address):636
ldaps://(服务器地址):636