Results 1 to 4 of 4

Thread: LDAP: error code 49 - Invalid Credentials

  1. #1
    Join Date
    Jan 2009
    Posts
    66

    LDAP: error code 49 - Invalid Credentials

    hi,
    I have Debian Sarge and openLDAP,When i try to insert new entries creates problem more i am getting that exception while using LdapTemplate.authenticate method.i am getting uid and password from JSP and on valid password the method return TRUE, but on wrong password, the throws exception :

    Exception :

    org.springframework.ldap.AuthenticationException: [LDAP: error code 49 - Invalid Credentials]; nested exception is javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid Credentials]
    Caused by: javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid Credentials]
    at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.jav a:2985)
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCt x.java:2931) AndFilter filter = new AndFilter()
    .and(new EqualsFilter(LDAPEnum.OBJ_CLASS.getValue(), LDAPEnum.PERSON_CLASS.getValue()))
    .and(new EqualsFilter(LDAPEnum.UID.getValue(), uid));

  2. #2
    Join Date
    May 2008
    Posts
    2,389

    Re: LDAP: error code 49 - Invalid Credentials

    A typical ldif might look like this:
    Code:
    # Root Organization
    dn: dc=example,dc=com
    dc: example
    objectClass: dcObject
    objectClass: organization
    o: Example Inc

    # Barbara's Entry
    dn: cn=Barbara J Jensen, dc=example, dc=com
    cn: Barbara J Jensen
    objectClass: person
    gn: Barbara
    sn: Jensen
    I can't say I've ever used the o=example,c=com format, but assuming it works the same way as using dc=, then you're missing the dn: prefix on the line for o=litho,c=com as well as on the cn=Manager, o=litho, c=com line. You should also change a lot of those equal signs to colons. So fixing it up, I would guess that your ldif should look more like this:
    Code:
    dn: o=litho, c=com
    objectClass: organization
    o: litho
    description: litho
    dn: cn=Manager, o=litho, c=com
    objectClass: organizationalRole
    cn: Manager
    description: manager

    and maybe you might want to add objectClass=dcObject to the first entry too? If I were doing it, I'd write it as such:
    Code:

    dn: dc=litho,dc=com
    dc: litho
    objectClass: dcObject
    objectClass: organization
    o: litho
    description: litho

    dc: cn=Manager, dc=litho, dc=com
    objectClass: organizationalRole
    cn: Manager
    description: manager

  3. #3
    Join Date
    Aug 2007
    Posts
    1,098

    Re: LDAP: error code 49 - Invalid Credentials

    check here for LDAP Troubleshooting

  4. #4
    Join Date
    Feb 2008
    Posts
    1,852

    Re: LDAP: error code 49 - Invalid Credentials

    Type visudo to edit /etc/sudoers rather than another text editor (vi, nano, nedit, gedit, etc). Visudo provides basic sanity checks, looks for parse errors, and locks the sudoers file against multiple simultaneous edits (say you we're in a multi-admin environment).

    If requiretty is set sudo will only run when the user is logged in to a real tty. Requiring it disallows things like 'rsh somehost sudo ls' since rsh does not allocate a tty, etc, etc. Here we're turning it off because it's saying "you must have a tty to run sudo".

Similar Threads

  1. Replies: 3
    Last Post: 29-11-2011, 06:34 PM
  2. Error code 0x80070003 for Invalid Product Key
    By Agavoli in forum Video Games
    Replies: 4
    Last Post: 17-08-2011, 11:30 PM
  3. Replies: 5
    Last Post: 18-05-2011, 06:55 PM
  4. Replies: 1
    Last Post: 24-03-2010, 10:12 PM
  5. Access is denied due to invalid credentials
    By Custidio in forum Networking & Security
    Replies: 3
    Last Post: 09-12-2009, 09:37 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,714,043,266.31354 seconds with 17 queries