Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 17-04-2009
Member
 
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));
Reply With Quote
  #2  
Old 17-04-2009
Member
 
Join Date: May 2008
Posts: 2,383
Re: LDAP: error code 49 - Invalid Credentials

A typical ldif might look like this:
Code:
Quote:
# 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:
Quote:
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:

Quote:
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
Reply With Quote
  #3  
Old 17-04-2009
Member
 
Join Date: Aug 2007
Posts: 1,098
Re: LDAP: error code 49 - Invalid Credentials

check here for LDAP Troubleshooting
Reply With Quote
  #4  
Old 17-04-2009
Member
 
Join Date: Feb 2008
Posts: 1,848
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".
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "LDAP: error code 49 - Invalid Credentials"
Thread Thread Starter Forum Replies Last Post
Getting "invalid MMI code message" error on HTC Sensation XL Ajitey Portable Devices 3 29-11-2011 06:34 PM
Error code 0x80070003 for Invalid Product Key Agavoli Video Games 4 17-08-2011 11:30 PM
The Wihcher 2 : assassin of king error ?Activation code invalid? honor Video Games 5 18-05-2011 06:55 PM
LDAP Issue - LDAP BIND against Windows 2008 DC does not work karrma Active Directory 1 24-03-2010 10:12 PM
Access is denied due to invalid credentials Custidio Networking & Security 3 09-12-2009 09:37 PM


All times are GMT +5.5. The time now is 01:42 AM.