Forums

Home » Liferay Portal » English » Liferay Legacy »

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Matthias B B
LDAP and authentification with login
July 1, 2007 8:58 PM
Answer

Matthias B B

Rank: New Member

Posts: 9

Join Date: June 28, 2007

Recent Posts

Hi,
I would like to authenticate my users using a LDAP server.
I manage to do it with their email adress but I would like it to be done acording to their 'cn' attribute.
I tried to change (mail=@email_address@) with (cn=@user_id@) but doesn't seem to work.
On top of that, what does the token @user_id@ refers to?
Gautama Himawan
RE: LDAP and authentification with login
October 31, 2008 1:02 AM
Answer

Gautama Himawan

Rank: New Member

Posts: 7

Join Date: September 7, 2008

Recent Posts

Hi,

I've got the same problem. After I do try and error, I conclude that authentication filter using cn=@user_id@ or uid=@user_id@ does not work if user does not exist in database (I'm using MySQL v5). This is because Liferay will search an autogenerate user_id by Liferay (table "user_" in field "userId").

So make sure if you login using authentication "By User ID", you should use your auto generated user_id that Liferay make for you (this mean user already exist in the database and not only exist in LDAP), or the authentication will not work.

I found the rest of authentication (using "email address" and "screen name") is work even user not exist in database (Liferay will create the user in database). But you must take a note, that attribute value that will be mapped to screen name in LDAP (using cn or uid or other attribute) should not contain underscore ( _ ) or space ( ) or all numbers (ex: 112545 -> wrong, tommy123 -> right)