Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
sricanth arroju
importing users from MS Active directory to Liferay
November 30, 2009 6:26 AM
Answer

sricanth arroju

Rank: Regular Member

Posts: 126

Join Date: October 2, 2009

Recent Posts

Hello All,

im trying to import users from ldap to liferay but while add ing users
i have added debugging statemeents to find which attribute is invalid
but i could not find which attribute invalid

i have checked portal.properties

1
2 ldap.user.mappings=screenName=cn\npassword=cn\nemailAddress=mail\nfirstName=givenName\nlastName=sn\njobTitle=title\ngroup=memberof


and i have set the usermappings in enterprise admin
portlet



 1
 2creatorUserId0
 3companyId10114
 4autoPasswordtrue
 5password
 6autoScreenNamefalse
 7screenNameadministrator
 8openId
 9locale
10firstNameAdministrator
11middleName
12lastNameAdministrator
13prefixId0
14suffixId0
15maletrue
16birthdayMonth0
17
18birthdayDay1birthdayYear1970jobTitlenullgroupIdsorganizationIdsnullnullnull
19
20
21
2214:06:25,930 ERROR [PortalLDAPUtil:927] Problem adding user with screen name administrator and email
23 address Administrator@rpwebapps.com
24com.liferay.portal.ModelListenerException: javax.naming.directory.InvalidAttributeValueException: [L
25DAP: error code 21 - 00000057: LdapErr: DSID-0C090B73, comment: Error in attribute conversion operat
26ion, data 0, v1772 ]; remaining name 'CN=Administrator,cn=Users,dc=rpwebapps,dc=com'
27        at com.liferay.portal.model.ContactListener.onAfterCreate(ContactListener.java:43)
28        at com.liferay.portal.model.ContactListener.onAfterCreate(ContactListener.java:36)
29        at com.liferay.portal.service.persistence.ContactPersistenceImpl.update(ContactPersistenceIm
Tomas Polesovsky
RE: importing users from MS Active directory to Liferay
November 30, 2009 1:23 PM
Answer

Tomas Polesovsky

LIFERAY STAFF

Rank: Liferay Master

Posts: 570

Join Date: February 13, 2009

Recent Posts

Hi,

I don't understand the problem but:

InvalidAttributeValueException & Error in attribute conversion operation => Maybe you are trying to map LDAP attribute to the Liferay attribute but the types are different?

-- tom
sricanth arroju
RE: importing users from MS Active directory to Liferay
November 30, 2009 10:58 PM
Answer

sricanth arroju

Rank: Regular Member

Posts: 126

Join Date: October 2, 2009

Recent Posts

Thanks Thomas, for the quick reply

how could i know which attribute type is invalid.

MS active directory dose not show password ,so i want to change the user mappings in portal.properties
1
2ldap.user.mappings=screenName=cn\npassword=cn\nemailAddress=mail\nfirstName=givenName\nlastName=sn\njobTitle=title\ngroup=memberof


but no help it displaying the same error. from the error im not able to find which attribute is invalid
sricanth arroju
RE: importing users from MS Active directory to Liferay
December 1, 2009 5:01 AM
Answer

sricanth arroju

Rank: Regular Member

Posts: 126

Join Date: October 2, 2009

Recent Posts

Hello tomas ,

i have changed the portal.properties file

1
2#ldap.auth.method=bind
3    ldap.auth.method=password-compare


ldap.user.mappings=screenName=cn\npassword=userPassword\nemailAddress=mail\nfirstName=givenName\nlastName=sn\njobTitle=title\ngroup=groupMembership

ldap.group.mappings=groupName=cn\ndescription=description\nuser=uniqueMember


with this changes the users from AD are added to liferay.

but im not able to login with Ad directory user credentials

i have checked the user table the active directory user passwords are encrypted.

Thanks,
Srikanth A
Tomas Polesovsky
RE: importing users from MS Active directory to Liferay
December 1, 2009 12:23 PM
Answer

Tomas Polesovsky

LIFERAY STAFF

Rank: Liferay Master

Posts: 570

Join Date: February 13, 2009

Recent Posts

Hi,

I think that the bind auth method is OK.

As I can see the ContactListener.java, there can be problem with PortalLDAPUtil.exportToLDAP(contact);

You can see it also in the cause exception's stacktrace in your 2nd post.

At first, try to disable export to LDAP:
ldap.export.enabled=false

Then, if it still doesn't work, check your ldap authentication and set:
ldap.auth.enabled=true
ldap.auth.required=false

Please verify the mapping cn into screenName and then auth search filter:
ldap.auth.search.filter=(cn=@screen_name@)



-- tom
sricanth arroju
RE: importing users from MS Active directory to Liferay
December 2, 2009 1:01 AM
Answer

sricanth arroju

Rank: Regular Member

Posts: 126

Join Date: October 2, 2009

Recent Posts

thanks tomas
i have changed the ldap.auth.method=bind
and i can login with active directory user credentials

Thanks,
Srikanth A
Brian Ko
RE: importing users from MS Active directory to Liferay
May 19, 2010 7:59 AM
Answer

Brian Ko

Rank: Junior Member

Posts: 70

Join Date: February 11, 2010

Recent Posts

Srikanth,

When all was successful, were you able to see the password(encrypted or not) in your user table? I am trying to use user password for the SSO inside the portal but I could not find a way to see user password. Thank you.

Brian Ko