I am currently trying to write a web app gui to administrate a samba domain controller.
I am able to add, modify, and delete users.
Setting passwords does not seem to work for some reason.
I can set the password with ldap_modify and this ldif:
dn: CN=TestUser,CN=Users,DC=mydomain,DC=local
changetype: modify
delete: unicodePwd
-
add: unicodePwd
unicodePwd:: IgB0AGUAcwB0AFAAYQBzAHMAdwBvAHIAZAAxADIAMwA0ACIA
But when I try to accomplish the same in ldap3 it does not work and I am having difficulties determining what is different.
I am running ldap.modify as:
ldap.modify(
&query_base,
mods
).await?.success()?;
where query_base is "CN=TestUser,CN=Users,DC=mydomain,DC=local"
It is run after successfully binding with:
CN=Administrator,CN=Users,DC=mydomain,DC=local
I am using the Mod<String> generic to deserialize the JSON from my api call.
A println!("{:?}", mods) gives:
[
Delete("unicodePwd", {}),
Add("unicodePwd", {"IgB0AGUAcwB0AFAAYQBzAHMAdwBvAHIAZAAxADIAMwA0ACIA"})
]
I am hoping some can figure out how my rust ldap3 ldap.modify call is different from the ldap_modify ldif that I am performing from the command line.
Both my ldap_modify and the rust ldap3 ldap.modify are running with starttls set.