Use an LDIF to change the user's userPassword:
For Microsoft Active Directory you would need to Enable UserPassword in Microsoft Active Directory
dn: CN=John Smith, OU=Users,DC=Fabrikam,DC=com changetype: modify delete: userPassword userPassword: oldPassword - add: userPassword userPassword: newPassword
The following example uses LDIF to perform a Password Reset to newPassword.
dn: CN=John Smith, OU=Users,DC=Fabrikam,DC=com changetype: modify replace: userPassword userPassword: newPassword -
The second way to modify the attribute is analogous to an administrator resetting a password for a user. To do this, the client must have bound as an administrator a user who has sufficient rights to modify other users' passwords. The modify request should contain a single replace operation with the new password enclosed in quotation marks and be Base64 encoded. If the client has sufficient rights, this password becomes the new password regardless of what the old password was.
dn: CN=John Smith, OU=Users,DC=Fabrikam,DC=com changetype: modify delete: unicodePwd unicodePwd::HgBuAGUAdwBKLSQAGEAcwBzAHcAbwByHJE= - add: unicodePwd unicodePwd::IgBuAGUAdwBQAGEAcwBzAHcAbwByAGQAIgA=
The following Example LDIF file changes a password to newPassword:
dn: CN=TestUser,DC=testdomain,DC=com changetype: modify replace: unicodePwd unicodePwd::IgBuAGUAdwBQAGEAcwBzAHcAbwByAGQAIgA= -