Results 1 to 2 of 2

Thread: Problem in binding the user in LDAP using Spring LDAP

  1. #1
    Join Date
    Dec 2010
    Posts
    1

    Problem in binding the user in LDAP using Spring LDAP

    I have specified the context source in application context file....
    <bean id="contextSource" class="org.springframework.ldap.core.support.LdapContextSource">
    <property name="url" value="ldap://brm-devoid-01.test.com:389/"/>
    <property name="base" value="ou=Users,dc=external,dc=test,dc=com"/>
    <property name="userDn" value="cn=myName"/>
    <property name="password" value="mypassword"/>
    </bean>

    <bean id="ldapTemplate" class="org.springframework.ldap.core.LdapTemplate" >
    <constructor-arg ref="contextSource"/>
    </bean>
    <bean id="activation" class="com.test.ActivationImpl">
    <property name="ldapTemplate" ref="ldapTemplate"/>
    </bean>

    With these specification in place, I am able to read a user from LDAP successfully also I am able to list all the user from LDAP. But when I am trying to add a user using ldapTemplate.bind() then I am getting following exception:

    javax.naming.NameNotFoundException: [LDAP: error code 32 - Parent entry not found in the directory.]; remaining name 'brusertype=End User,brsupportuser=N,brprofileupdateflag=N,brreset flag=N,brsegment=GUEST,brrelationshiptype=GENERAL, cn=Dinesh Narayanan,sn=Narayanan,givenname=Dinesh,userpasswo rd=password1,uid=testingspringldap2@intrado.com,ou =users,dc=external,dc=test,dc=com'

    Please help me coz I m struggling it with for past 4 days....

  2. #2
    Join Date
    Dec 2007
    Posts
    1,736

    Re: Problem in binding the user in LDAP using Spring LDAP

    It looks like your LDAP is configured to not allow a search without binding to it (no anonymous bind). Also you have implemented PasswordComparisonAuthenticator and not BindAuthenticator to authenticate to LDAP. You could try modifying your queryEmployeesByName() method to bind and then search, looking at some examples in the doc.

Similar Threads

  1. LDAP query to speficied LDAP server on TCP port 389 failed
    By Shash in forum Windows Server Help
    Replies: 2
    Last Post: 02-05-2012, 05:01 PM
  2. AD user limited to read ldap only
    By madistan in forum Windows Security
    Replies: 5
    Last Post: 18-06-2011, 12:29 AM
  3. Introduction to Spring LDAP
    By blueprats in forum Guides & Tutorials
    Replies: 3
    Last Post: 25-03-2010, 12:38 PM
  4. Replies: 1
    Last Post: 24-03-2010, 10:12 PM
  5. User permissions to read LDAP
    By Dharitree in forum Window 2000 Help
    Replies: 2
    Last Post: 14-05-2006, 07:13 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,710,819,814.01153 seconds with 17 queries