title: How to set md5-hashed password to Active Directory user
body: <p>Have a lot of users with passwords stored as md5 hash. Now want to add all those users to Active Directory. Everything works perfectly with unicode passwords for new users. But we don't have plain passwords for old ones.</p>
  
  <p>Found that I can send md5 hashed password to AD adding:</p>
  
  <pre><code>$user['userPassword'] = '{MD5}'.base64_encode(pack('H*', md5($password)));
  </code></pre>
  
  <p>But it looks like AD does not understand that format. But accepts user creation request. If look through the user properties - no such attribute as userPassword and rejects at login.</p>
  
  <p>How should be configured AD in order to receive such passwords and understand them?</p>