title: OpenLdap (Centos 5.9): Invalid credentials (49)
body: <p>When i run the next command it's all KO:</p>
  
  <pre><code>ldapsearch -x -b "dc=icm,dc=movismart,dc=com" -D "cn=Manager,dc=icm,dc=movismart,dc=com" -W
  </code></pre>
  
  <p>But when i run this it's a problem "Invalid Credentials (49)":</p>
  
  <pre><code>ldapsearch -x -b "dc=icm,dc=movismart,dc=com" -D "uid=sysadmin,dc=icm,dc=movismart,dc=com" -W
  </code></pre>
  
  <p>My slapd.conf:</p>
  
  <pre><code>loglevel 1
  
  include     /etc/openldap/schema/core.schema
  include     /etc/openldap/schema/cosine.schema
  include     /etc/openldap/schema/inetorgperson.schema
  include     /etc/openldap/schema/nis.schema
  include     /etc/openldap/schema/openldap.schema
  include     /etc/openldap/schema/dyngroup.schema
  
  allow bind_v2
  
  pidfile     /var/run/openldap/slapd.pid
  argsfile    /var/run/openldap/slapd.args
  
  access to attrs=userPassword
      by dn="cn=Manager,dc=icm,dc=movismart,dc=com" write
      by self write
      by anonymous auth
      by * none
  access to dn.base="" by * read
  access to *
      by dn="cn=Manager,dc=icm,dc=movismart,dc=com" write
      by * read
  
  database    bdb
  suffix      "dc=icm,dc=movismart,dc=com"
  rootdn      "cn=Manager,dc=icm,dc=movismart,dc=com"
  rootpw {SSHA}9xDlp+gBzA2E4EHXb4KXVkylAll7WmZd
  directory   /var/lib/ldap
  
  index objectClass                       eq,pres
  index ou,cn,mail,surname,givenname      eq,pres,sub
  index uidNumber,gidNumber,loginShell    eq,pres
  index uid,memberUid                     eq,pres,sub
  index nisMapName,nisMapEntry            eq,pres,sub
  </code></pre>
  
  <p>My structure ldif:</p>
  
  <pre><code>dn: dc=icm,dc=movismart,dc=com
  objectClass: domain
  objectClass: top
  dc: icm
  
  dn: ou=People,dc=icm,dc=movismart,dc=com
  objectclass: top
  objectclass: organizationalUnit
  ou: People
  description: Container for user entries
  </code></pre>
  
  <p>My sysadmin user ldif:</p>
  
  <pre><code>dn: uid=sysadmin,ou=People,dc=icm,dc=movismart,dc=com
  objectclass: top
  objectclass: uidObject
  objectclass: person
  uid: sysadmin
  cn: System Administrator
  sn: sysadmin
  userPassword: sysadmin
  </code></pre>
  
  <p>I probe with plain text, crypt, md5 and ssha userPassword, and nothing.</p>
  
  <p>Thanks a lot!!</p>