First time here? Check out the FAQ!
![]() | 1 | initial version |
After more digging, I got a little further and discovered some potential bugs:
NOTE: Any operation involving the password must be done over TLS (i.e. LDAPS), otherwise AD will reject the request. This should be noted in the documentation.
the "UNWILLING_TO_PERFORM" response from AD is because keystone attempts to first create a user with the userAccountStatus value of 512, but is not providing a password. AD will not allow accounts with no password to have that status value (NORMAL_ACCOUNT).
The correct password field to use when setting or changing a user password in AD is "unicodePwd", and it must be encoded correctly:
unipwd = base64.b64encode(unicode("\"AnExamplePassword1!\"").encode('utf-16-le'))
Ex: unicodePwd:: IgBBAG4ARQB4AGEAbQBwAGwAZQBQAGEAcwBzAHcAbwByAGQAMQAhACIA (NOTE: the double colon "unicodePwd::" is correct,not a typo).
It appears that keystone uses "userPassword", which AD seems to ignore in favor of "unicodePwd". Also, the 'unicodePwd' attibute is read-only and will never be given back in a query response.