Error 32 No Such Object
Contents |
+0530 Content-class: urn:content-classes:message Thread-index: AcSVtjpb7/rjNX9QQgqZfpnpEV79Kw== Thread-topic: Error Code 32 - No such object ? When i try to connect from a LDAP Browser (Softerra) giving following information Host :
Javax.naming.authenticationexception Ldap Error Code 32 - No Such Object
the same inputs i get following error : LDAP Error Code 32 - No such object - remaining name 'dc=my-domain,dc=com' Also, when i do : rpm -qa openldap i get this: openldap-2.0.27-11 http://www.ibm.com/support/knowledgecenter/SSGRP3_2.2.0/doc/iwd/tst_trbl_ldap_messages.html openldap-2.2.13-2 I am not sure which of the above versions is installed. Thanks My /etc/openldap/slapd.conf looks like this : # $OpenLDAP: pkg/ldap/servers/slapd/slapd.conf,v 1.8.8.7 2001/09/27 20:00:31 Kurt Exp $ # # See slapd.conf(5) for details on configuration options. # This file should NOT be world readable. # 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/redhat/autofs.schema include /etc/openldap/schema/redhat/kerberosobject.schema # Define global ACLs to disable default http://www.openldap.org/lists/openldap-software/200409/msg00141.html read access. # Do not enable referrals until AFTER you have a working directory # service AND an understanding of referrals. #referral ldap://root.openldap.org #pidfile //var/run/slapd.pid #argsfile //var/run/slapd.args # Create a replication log in /var/lib/ldap for use by slurpd. #replogfile /var/lib/ldap/master-slapd.replog # Load dynamic backend modules: # modulepath /usr/sbin/openldap # moduleload back_ldap.la # moduleload back_ldbm.la # moduleload back_passwd.la # moduleload back_shell.la # # The next three lines allow use of TLS for connections using a dummy test # certificate, but you should generate a proper certificate by changing to # /usr/share/ssl/certs, running "make slapd.pem", and fixing permissions on # slapd.pem so that the ldap user or group can read it. # TLSCertificateFile /usr/share/ssl/certs/slapd.pem # TLSCertificateKeyFile /usr/share/ssl/certs/slapd.pem # TLSCACertificateFile /usr/share/ssl/certs/ca-bundle.crt # # Sample Access Control # Allow read access of root DSE # Allow self write access # Allow authenticated users read access # Allow anonymous users to authenticate # #access to dn="" by * read #access to * # by self write # by users read # by anonymous auth # # if no access controls are present, the default is: # Allow read by all # # rootdn can always
This Site Careers Other all forums Forum: Security [LDAP: error code https://coderanch.com/t/436238/Security/LDAP-error-code-Object-remaining 32 - No Such Object]; remaining name '' Simpson Kumar Ranch Hand Posts: 261 posted 7 years ago I tried to test a simple application to fetch one attribute, but I get the following error javax.naming.NameNotFoundException: [LDAP: error code 32 - no such No Such Object]; remaining name '' at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3030) at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2951) at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2758) at com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1812) at com.sun.jndi.ldap.LdapCtx.c_search(LdapCtx.java:1735) at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(ComponentDirContext.java:368) at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:338) at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:321) at javax.naming.directory.InitialDirContext.search(InitialDirContext.java:248) at edu.georgetown.test.SimpleQuery.main(SimpleQuery.java:37) The following is my code: String url = "ldap://localhost:9080"; Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); no such object env.put(Context.PROVIDER_URL, url); DirContext context = new InitialDirContext(env); SearchControls ctrl = new SearchControls(); ctrl.setSearchScope(SearchControls.SUBTREE_SCOPE); NamingEnumeration enumeration = context.search("", "(objectClass=person)", ctrl); // Here I get the exception while (enumeration.hasMore()) { SearchResult result = (SearchResult) enumeration.next(); Attributes attribs = result.getAttributes(); NamingEnumeration values = ((BasicAttribute) attribs.get(attribute)).getAll(); while (values.hasMore()) { if (output.length() > 0) { output.append("|"); } output.append(values.next().toString()); } } } catch (Exception e) { e.printStackTrace(); } I Don't know what is the problem, could someone help on this Thanks, Sumant Thanks, Kumar Simpson Kumar Ranch Hand Posts: 261 posted 7 years ago I got to solve my problem and now I get the results. I just changed the following line by including the "dc=domain,dc=com", then I see the results NamingEnumeration enumeration = context.search("dc=domain,dc=com", "(objectClass=person)", ctrl); sumant Thanks