在ActiveDirectory中更新unicodepwd [英] Update unicodepwd in ActiveDirectory

查看:82
本文介绍了在ActiveDirectory中更新unicodepwd的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试更新WindowsAD中的unicodePwd属性.我正在使用ldaps://server:636来创建InitialContext.连接很好,我可以搜索记录.我还可以更新GivenName属性,因此我认为服务器没有任何通信问题.

I am trying to update the unicodePwd attribute in WindowsAD. I am using ldaps://server:636 to get the InitialContext created. The connection is just fine and I am able to search for a record. I can also update the givenName attribute, so I don't think there are any communication issues with the server.

我正在使用密码进行以下编码:javax.xml.bind.DatatypeConverter.printBase64Binary(('"' + "T3stPassw0rd!" + '"').getBytes("UTF-16LE"));

I am doing the following encoding with my password: javax.xml.bind.DatatypeConverter.printBase64Binary(('"' + "T3stPassw0rd!" + '"').getBytes("UTF-16LE"));

当我尝试更新unicodePwd时,出现以下错误javax.naming.OperationNotSupportedException:[LDAP:错误代码53-0000001F:SvcErr:DSID-031A120C,问题5003(WILL_NOT_PERFORM),数据0];

When I try to update unicodePwd, I get the below error javax.naming.OperationNotSupportedException: [LDAP: error code 53 - 0000001F: SvcErr: DSID-031A120C, problem 5003 (WILL_NOT_PERFORM), data 0 ];

在查找类似问题时,我了解到,如果连接不是ldaps(我的是ldaps,能够搜索和更新另一个属性)或编码不正确,就会发生这种情况.我使用的是推荐的编码,但似乎无法使我的代码正常工作.

On looking up similar issues, I came to understand that this can happen if the connection is not ldaps (mine is ldaps, am able to search and update another attribute) or if the encoding is incorrect. I am using the encoding that was recommended, but cannot seem to get my code to work.

对此表示感谢.

谢谢!

推荐答案

我们有一个已知有效的示例:

We have an example that is known to work:

示例-Active Directory更改密码JNDI

这篇关于在ActiveDirectory中更新unicodepwd的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆