title: Enter LDAP Password keeps saying ldap_bind: Invalid credentials (49)
body: <p>I looked everywhere for a solution to my problem but still didn't find it.
  I have these two simple files as sladp.conf and mytree.ldif and when i try to add something to mytree.ldif it keeps asking me for a password (which i believe is roopw defined in slapd.conf) but it doesn't work.
  I really need help with this.</p>
  
  <p>These are my files:</p>
  
  <p><strong>slapd.conf</strong></p>
  
  <pre><code>database dbd
  suffix "dc=ers,dc=uminho,dc=pt"
  rootdn "cn=Manager,dc=ers,dc=uminho,dc=pt"
  rootpw ersadmin
  directory /usr/local/var/openldap-data
  </code></pre>
  
  <p><strong>mytree.ldif</strong></p>
  
  <pre><code>dn: dc=ers, dc=uminho, dc=pt
  objectclass: dcObject
  objectclass: organization
  o: ERS
  dc: ers
  
  dn: cn=Manager,dc=ers,dc=uminho,dc=pt
  objectclass: organizationalRole
  cn: Manager
  </code></pre>
  
  <p>And this is what i'm trying to do and my response:</p>
  
  <pre><code>sudo ldapadd -x -D "cn=Manager,dc=ers,dc=uminho,dc=pt" -W -f /etc/ldap/mytree.ldif
  Enter LDAP Password:
  ldap_bind: Invalid credentials (49)
  </code></pre>
  
  <p>I already tried to encrypt the password using</p>
  
  <pre><code>slappasswd -h {SHA} -s ersadmin
  </code></pre>
  
  <p>and changing my slapd.conf file</p>
  
  <pre><code>password-hash   {SHA}
  rootpw  {SHA}pLEBIPx4rW3eebpwACBGAZkNH4CVBRGW
  </code></pre>
  
  <p>but it didn't work. Thanks in advance.</p>