title: Ldapsearch Error code 32 and 49
body: <p>I have an error, when I'm executing the next code</p>
  
  <pre><code>ldapsearch -xLLL -D "cn=admin,dc=geobolivia,dc=gob,dc=bo" -W &gt; dump-geobolivia.ldif
  </code></pre>
  
  <p>the error that I have is the </p>
  
  <pre><code>No such object (32)
  </code></pre>
  
  <p>and the error that appear in the syslog file is the next</p>
  
  <pre><code>Dec 19 18:49:00 geobolivia slapd[3045]: conn=1050 op=103 SRCH base="ou=users,dc=geobolivia,dc=gob,dc=bo" scope=1 deref=3 filter="(&amp;(objectClass=*)(mail=*@*)(givenName=*))"
  Dec 19 18:49:00 geobolivia slapd[3045]: &lt;= bdb_substring_candidates: (mail) not indexed
  Dec 19 18:49:00 geobolivia slapd[3045]: conn=1050 op=103 SEARCH RESULT tag=101 err=0 nentries=2 text=
  Dec 19 18:49:00 geobolivia slapd[3045]: conn=1050 op=104 SRCH base="ou=groups,dc=geobolivia,dc=gob,dc=bo" scope=1 deref=3 filter="(&amp;(objectClass=posixGroup)(cn=el_*))"
  Dec 19 18:49:00 geobolivia slapd[3045]: &lt;= bdb_substring_candidates: (cn) not indexed
  Dec 19 18:49:00 geobolivia slapd[3045]: conn=1050 op=104 SEARCH RESULT tag=101 err=0 nentries=0 text=
  Dec 19 18:49:01 geobolivia slapd[3045]: conn=1078 fd=22 ACCEPT from IP=127.0.0.1:57379 (IP=127.0.0.1:389)
  Dec 19 18:49:01 geobolivia slapd[3045]: conn=1078 op=0 BIND dn="cn=admin,dc=geobolivia,dc=gob,dc=bo" method=128
  Dec 19 18:49:01 geobolivia slapd[3045]: conn=1078 op=0 BIND dn="cn=admin,dc=geobolivia,dc=gob,dc=bo" mech=SIMPLE ssf=0
  Dec 19 18:49:01 geobolivia slapd[3045]: conn=1078 op=0 RESULT tag=97 err=0 text=
  Dec 19 18:49:01 geobolivia slapd[3045]: conn=1078 op=1 SRCH base="" scope=2 deref=0 filter="(objectClass=*)"
  Dec 19 18:49:01 geobolivia slapd[3045]: conn=1078 op=1 SEARCH RESULT tag=101 err=32 nentries=0 text=
  Dec 19 18:49:01 geobolivia slapd[3045]: conn=1078 op=2 UNBIND
  Dec 19 18:49:01 geobolivia slapd[3045]: conn=1078 fd=22 closed
  </code></pre>
  
  <p>I read in some post that i have to add the in the code the ou=users </p>
  
  <pre><code>ldapsearch -xLLL -D "cn=admin,ou=users,dc=geobolivia,dc=gob,dc=bo" -W &gt; dump-geobolivia.ldif
  </code></pre>
  
  <p>and when I do that, the error that I have is the </p>
  
  <pre><code>ldap_bind: Invalid credentials (49) 
  </code></pre>
  
  <p>and the log is</p>
  
  <pre><code>Dec 19 18:58:43 geobolivia slapd[3045]: conn=1080 fd=17 ACCEPT from IP=127.0.0.1:57515 (IP=127.0.0.1:389)
  Dec 19 18:58:43 geobolivia slapd[3045]: conn=1080 op=0 BIND dn="cn=admin,ou=users,dc=geobolivia,dc=gob,dc=bo" method=128
  Dec 19 18:58:43 geobolivia slapd[3045]: conn=1080 op=0 RESULT tag=97 err=49 text=
  Dec 19 18:58:43 geobolivia slapd[3045]: conn=1080 op=1 UNBIND
  Dec 19 18:58:43 geobolivia slapd[3045]: conn=1080 fd=17 closed
  </code></pre>
  
  <p>I'm using bind9 as DNS server and I think that's the problem but I don't know how to solve that.</p>