title: Set userPassword to {CRYPT-SHA-512} in OpenLDAP programmaticaly remotely?
body: <p>I'm trying to set a OpenLDAP userPassword to CRYPT-SHA-512 remotely. I would prefer to do this in PHP, but I'm open to other solutions that can be executed via PHP (e.g. python).</p>
  
  <p>It's easy to set the userPassword to SHA1 remotely by setting the userPassword = <code>'{SHA}'.base64_encode(sha1($password, true))</code>. </p>
  
  <p>How would you do this for CRYPT-SHA-512 password? </p>
  
  <p>I would assume the checker would have to use the same crypt and number of rounds.</p>
  
  <pre><code>&lt;?php
    $rounds = 5000; //??
    $salt = random_seventeen_char();
    $userPassword = '{CRYPT}'.crypt($password, '$6$rounds='.$rounds.'$'.salt.'$');
  ?&gt;
  </code></pre>
  
  <p>I am able to do this through Apache Directory Studio without issues but need to be able to do it via a script.</p>