title: Modify passwords in an LDIF file using ldapmodify command
body: <p>I have a LDIF file that consists of a set of test users and I would like to  change the passwords for these users.</p>
  
  <p>I used the <code>ldapmodify</code> command:</p>
  
  <pre><code>ldapmodify -c -a -f filename.ldif -h localhost -p &lt;port&gt; -D dn -w &lt;pwd&gt; &lt;&lt; !
  
  dn: uid=&lt;userid&gt;,dc=&lt;branch&gt;,DC=COM
  changetype: modify
  replace: userPassword
  userPassword: &lt;new pwd&gt;
  !
  </code></pre>
  
  <p>And I get the following error:</p>
  
  <pre><code>ldap_sasl_interactive_bind_s: Can't contact LDAP server (-1)
  </code></pre>
  
  <ol>
  <li>What does this mean?</li>
  <li>The syntax I have used can be used for only one user, I would like to modify the passwords of all the test users in my LDIF file. Is there a way to do so?</li>
  </ol>