RE: LDAP: error code 49 - INVALID_CREDENTIALS

thumbnail
3077583, modified 16 Years ago. Regular Member Posts: 226 Join Date: 5/12/09 Recent Posts
From the browser(Liferay Contraol panel) I can connect to Apache DS and list the users successfuly !

But when I try to login with one of that available person. I get following error :



09:09:18,245 ERROR [LDAPAuth:299] Failed to bind to the LDAP server: [LDAP: error code 49 - INVALID_CREDENTIALS: Bind failed: Cannot authenticate user cn=janesmith,dc=example,dc=com]

what i was doing is following the simple LDAP guide at page "http://docs.liferay.com/portal/4.2/official/liferay-installation-guide-4.2/multipage/ch05s02.html" !

Any suggestion or idea ?


AND

this is the exception thrown when I login with test@liferay.com

here there is ou=users at dn !



12:04:10,088 ERROR [PortalLDAPUtil:256] javax.naming.NameNotFoundException: [LDAP: error code 32 - NO_SUCH_OBJECT: failed for Add Request :
ClientEntry
dn: cn=test,ou=users,dc=example,dc=com
objectclass: top
objectclass: person
objectclass: inetOrgPerson
objectclass: organizationalPerson
mail: test@liferay.com
sn: Test
cn: test
givenName: Test
: Parent ou=users,dc=example,dc=com not found]; remaining name 'cn=test,ou=users,dc=example,dc=com'
javax.naming.NameNotFoundException: [LDAP: error code 32 - NO_SUCH_OBJECT: failed for Add Request :
ClientEntry
dn: cn=test,ou=users,dc=example,dc=com
objectclass: top
objectclass: person
objectclass: inetOrgPerson
objectclass: organizationalPerson
mail: test@liferay.com
sn: Test
cn: test
givenName: Test
: Parent ou=users,dc=example,dc=com not found]; remaining name 'cn=test,ou=users,dc=example,dc=com'
4309314, modified 16 Years ago. Regular Member Posts: 157 Join Date: 11/23/09 Recent Posts
I would suggest you to debug LDAPAuth.java (authenticate()) to see what's going on.
Do you authenticate by screenname or email address? Is your search filter in portal-ext.properties set?
ldap.auth.search.filter=(uid=@screen_name@)

hint: if you change the ext.properties file after the initial run, you have to do the changes in the portal, because these settings overwrite the properties settings.

Regards
hub

p.s.
test@liferay.com is authenticated against LDAP and probly does not exist in the LDAP directory.
as far as I know, LDAP authentication is skipped if the user is omni admin. Is your company web id still "liferay.com"?

company.default.web.id=liferay.com
thumbnail
3077583, modified 16 Years ago. Regular Member Posts: 226 Join Date: 5/12/09 Recent Posts
It worked. I was getting the error because my password was not saved in plain text. It was hashed but looks like plain...

I modified ext.properties file and after debugging and controlling whether required is set. I found that LDAPAuth.java (authenticate()) and required() are called and now functions properly.

Thanks for the help.
Mohamed Faisal, modified 12 Years ago. Junior Member Posts: 90 Join Date: 8/12/09 Recent Posts
Hi Muhtaroglu,

I am getting same error.
what modification needs to be done in portal-ext.properties?

Regards,
Faisal