title: How to change Drupal user password programmatically?
body: <p>We are going to deploy a Drupal site inside company's intranet. There is a requirement for user to reset password. We have a centralized password reset mechanism (for single sign on):</p>
  
  <ul>
  <li>user submits a password change request in system</li>
  <li>the request is sent to a password server</li>
  <li>the password server will reset the user's password in <em>all systems</em> with a new password</li>
  <li>the password server will send the new password to user's mobile phone via sms</li>
  </ul>
  
  <p>Now we are going to add the Drupal site to <em>all systems</em>. Please suggest a way to change the Drupal's logon password by an external program (assume the system can run script on the Drupal host and edit Drupal MySQL database).</p>