Open Wolfhound905 opened 7 months ago
I fixed this by setting the "unicodePwd" attribute and using GSSAPI for auth.
here is the funciton if anyone is interested.
def encode_password(password: str):
"""Encodes a password to be set for an AD account via the LDAP protocol.
Surrounds password in quotes and encodes with 'utf-16-le' as is required when setting the
password of the computer account.
"""
quoted_pw = '"' + password + '"'
encoded_pw = quoted_pw.encode("utf-16-le")
return encoded_pw
I have created an async connection and am doing the following:
The user is being created and no errors are returned. But when trying to log into the account, the password is wrong. It seems to be that the password is just never being set, as I am able to just log in with no password.
I am using "SIMPLE" auth mech.
Please let me know what I may be doing wrong, or if this is a library issue.