more useful options | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Hi francism8!
I do not claim any significant knowledge of Windows 2012 R2 AD (Active Directory). However, I hope by asking a few (perhaps "dumb") questions, that you may be able to see something that I do not? Your code looks fundamentally sound to me (the flow and error checking appear to be ok). The main difference appears to be in how the 2 servers are configured. First, a lot changes happen by moving from LDAPS (Secure LDAP), port 636 in Win 2008 R2 to plain LDAP, port 389 in Win 2012. That direction is usually much easier than moving from a plain connection to an encrypted connection. I don't know why that change in connection protocol was done, but it appears to work. As a rather bizarre idea, I considered the idea that your code is actually "working" as written, although it is not achieving the desired result (actual password change). I do not know why you changed from setting "unicodePwd" to setting the "userPassword"? So I investigated that. I found this on a site that I do not want to advertise here, but: unicodePwd is the "real password attribute", That's what is used for user binds. It has a very specific formatting requirements. Whenever you set a value, it must be a unicode string enclosed in double quotes. So one theory could be that you are successfully setting "userPassword" as a regular attribute. But that doesn't actually change the "unicodePwd" because AD (Active Directory) default for this field has not been configured as a write only alias for "unicodePwd". Essentially you change "userPassword", but it doesn't matter? There appear to be some formatting details when using the "unicodePwd" alias. If you are able to read "userPassword", that would indicate that it is not an alias for "unicodePwd" because "real passwords" cannot be read. Try it and see what happens. I looked at Microsoft site: unicodePwd attribute and this attribute appears to be the same between Win 2008 R2 and 2012 R2. Hope these questions help you. In reply to Re: It does not change password in LDAP Windows 2012 R2
by Marshall
|
|