構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
Timm Wimmers
Mapping LDAP user data to Liferay user data
2009/03/26 6:20
答え

Timm Wimmers

ランク: New Member

投稿: 16

参加年月日: 2009/03/25

最近の投稿

Hello,

we've installed Liferay successfully and bind authentification to LDAP. Now we want to fill the data for liferay users (i.e. street, city, zipcode, birthday, telephone etc.) with data from LDAP - how con that be done?

Thank you.

--
Timm
Samuel Kong
RE: Mapping LDAP user data to Liferay user data
2009/03/26 10:40
答え

Samuel Kong

LIFERAY STAFF

ランク: Liferay Master

投稿: 979

参加年月日: 2008/03/10

最近の投稿

Liferay currently only syncs a user's screen name, password, email, name, and job title. If you want to sync additional properties, you'll need to modify PortalLDAPUtil
Jignesh Vachhani
RE: Mapping LDAP user data to Liferay user data
2009/08/06 22:04
答え

Jignesh Vachhani

ランク: Liferay Master

投稿: 780

参加年月日: 2008/03/10

最近の投稿

hey samuel,

have you done this anytime?

If you have done please provide more information on that

Thanks
vikas suresh thakre
RE: Mapping LDAP user data to Liferay user data
2009/09/08 23:58
答え

vikas suresh thakre

ランク: Junior Member

投稿: 97

参加年月日: 2009/05/18

最近の投稿

Hi all,
I also have same requirment. I want to import user information other than the five field which are by default get imported.
like i want to store user's phone No, address etc from the LDAP Directory.
If anybody has done this pls provide some information about that.
any help here is appreciable.
Jignesh Vachhani
RE: Mapping LDAP user data to Liferay user data
2009/09/09 1:02
答え

Jignesh Vachhani

ランク: Liferay Master

投稿: 780

参加年月日: 2008/03/10

最近の投稿

Hi Vikas,

I have successfully done this task you can integrate any fields as you want.

For that you cant use Liferay setting GUI you have to make setting in your portal-ext.properties file.

You have to add fields over there and you have to map these all fields into you portalldaputil.java class.
vikas suresh thakre
RE: Mapping LDAP user data to Liferay user data
2009/09/09 6:08
答え

vikas suresh thakre

ランク: Junior Member

投稿: 97

参加年月日: 2009/05/18

最近の投稿

Hi Jignesh,
Thanks for replying
can u please tell me the Exact steps to add other user attributes in to the database like mobile number i have to insert in to the
phone table, city , street i have to enter in to the address table.
so tell me where should i write this code so that it will update these table for each user.
if u have done that pls tell me the steps to modify the code..
thanks
Jignesh Vachhani
RE: Mapping LDAP user data to Liferay user data
2012/03/04 21:53
答え

Jignesh Vachhani

ランク: Liferay Master

投稿: 780

参加年月日: 2008/03/10

最近の投稿

Hi Vikas,

Follow these steps:

1.Make ready your LDAP server with your fields with proper schema.
2.change portal-ext.properties ldap.user.mappings=screenName=cn\npassword=userPassword\nemailAddress=mail\nfirstName=givenName\nlastName=sn\njobTitle=title\nlocation=location\ndescription=description\npractice=practice\nphone=telephoneNumber\nbirthDate=birthDate\ndepartment=department\ncontactPerson=contactPersonName\nuserType=userType\ngroup=groupMembership\njoiningDate=joiningDate as per your requirement .
3.create your own service with these fields
4. call add method from your service into portalldaputil.java

and restart your server so it will automatically take fields from ldap and populate your table.
You can also refer this article
Daniel Paschke
RE: Mapping LDAP user data to Liferay user data
2009/11/26 5:33
答え

Daniel Paschke

ランク: New Member

投稿: 11

参加年月日: 2009/11/25

最近の投稿

Hello Jignesh,

can you please tell me how to create a service? and what to define there?

I got a similar problem then the one above:

I need to map usergroups from a specific ldap attribute called "employeeType" but my ldap-server does not have any groupsDN, so ldap fails to import a users employeeType-attribute to the liferay-group because there is no groupDN ...

i know that there was a similar patch in

http://issues.liferay.com/browse/LEP-3915

but this one is for liferay 4.x and im using 5.2 now.. and i just want to know if it is possible to achieve a simple group mapping (without looking into ldap-groups) without touching the liferay sources (by doin it in extension environment)

I hope i made myself clear enough
Jignesh Vachhani
RE: Mapping LDAP user data to Liferay user data
2009/11/26 5:50
答え

Jignesh Vachhani

ランク: Liferay Master

投稿: 780

参加年月日: 2008/03/10

最近の投稿

If you have created your own attribute then you need to define this in portal-ext.properties file and according to that you have to fetch that attribute in portalldaputil.java class.
Timm Wimmers
RE: Mapping LDAP user data to Liferay user data
2010/02/11 7:57
答え

Timm Wimmers

ランク: New Member

投稿: 16

参加年月日: 2009/03/25

最近の投稿

Hello Jignesh,

how exactly did you do that?
Can you please share the LDAP parts of your portal-ext.properties and the modifications on the java file?

I'm not a java programmer, but will give it a try if I can get a good starting point in this example.

Thank you,
Timm
praveen kumar
RE: Mapping LDAP user data to Liferay user data
2010/02/15 2:23
答え

praveen kumar

ランク: New Member

投稿: 4

参加年月日: 2009/12/29

最近の投稿

Hi Timm,

For instance if you have added an new or modified ldap properties in your ext.properties

e.g : ldap.base.provider.url=ldap://127.0.0.1:1389

modified ldap_new.base.provider.url=ldap://127.0.0.1:1389

in order to reflect these changes you should also modify/add your properties

1. In PropsKeys.java
2. In PropsValues.java

and modify PortalLDAPUtil.java by extending it in Ext environment.


Praveen.
vikas suresh thakre
RE: Mapping LDAP user data to Liferay user data
2010/02/21 22:45
答え

vikas suresh thakre

ランク: Junior Member

投稿: 97

参加年月日: 2009/05/18

最近の投稿

Hi Guys, if your are using liferay 5.2 version then there is not need to change the code for custom attribute. from control pannel you can create your own custom attribute for the user.

Thanks
Vikas Thakre.
Jignesh Vachhani
RE: Mapping LDAP user data to Liferay user data
2010/02/21 22:55
答え

Jignesh Vachhani

ランク: Liferay Master

投稿: 780

参加年月日: 2008/03/10

最近の投稿

Hi Timm,

I already mentioned the steps in my previous post in the same thread.
Ryan Ward
RE: Mapping LDAP user data to Liferay user data
2010/02/22 14:00
答え

Ryan Ward

ランク: New Member

投稿: 18

参加年月日: 2010/02/12

最近の投稿

Do you still need to edit the Java files in 5.2? (I assume you do) I see where I can add custom classes via the GUI.
Chuck Wyatt
RE: Mapping LDAP user data to Liferay user data
2013/01/04 6:30
答え

Chuck Wyatt

ランク: New Member

投稿: 10

参加年月日: 2011/10/17

最近の投稿

Hi Daniel,

I'm wondering if you eventually had success with this? We're in Liferay 6.1.1 CE GA2. We have LDAP user attributes that we'd like to use as an indication of in what Liferay group a user has membership. This sounds similar to the issue you had? Like you I found this old patch for 4.x but that doesn't apply now and wondering the best way to map groups membership based on the values of LDAP user attributes.

Thanks,

Chuck
Marco Paul Timbi Ulloa
RE: Mapping LDAP user data to Liferay user data
2010/12/29 8:49
答え

Marco Paul Timbi Ulloa

ランク: New Member

投稿: 5

参加年月日: 2010/12/13

最近の投稿

I have the version 6.0.5, try to use the custom ldap mapping, but don't work, how use the parameters??

I have the next lines in portal-ext.properties

ldap.user.custom.mappings=uid=Identificacion, where uid is my attribute in LDAP and Identificacion is the custom user field in Liferay.

But this don't work
Shagul Khajamohideen
RE: Mapping LDAP user data to Liferay user data
2010/12/29 10:31
答え

Shagul Khajamohideen

ランク: Liferay Master

投稿: 759

参加年月日: 2007/09/27

最近の投稿

Try the below. You need to change the order (customattribute=LDAPAttribute).

ldap.user.custom.mappings=Identificacion=uid

Also any changes to this property after the initial LDAP setup does not reload from properties file. To force a load, you could delete the existing LDAP setup from control panel and create a new one. This forces the settings to be read from portal-ext.properties file which then gets persisted to the database.

Since the properties file is the only out of the box way to change these settings, I think these properties (the ones that cannot be changed from control panel) should be read from the file on startup.
Marco Paul Timbi Ulloa
RE: Mapping LDAP user data to Liferay user data
2010/12/29 10:26
答え

Marco Paul Timbi Ulloa

ランク: New Member

投稿: 5

参加年月日: 2010/12/13

最近の投稿

My ldap parameter is uid and my Liferay Parameter is Identificacion, I deactive the accounts and delete the accounts, restart the service and nothing... The parameter in in portal-ext.properties or portal-developer.properties
Shagul Khajamohideen
RE: Mapping LDAP user data to Liferay user data
2010/12/29 10:34
答え

Shagul Khajamohideen

ランク: Liferay Master

投稿: 759

参加年月日: 2007/09/27

最近の投稿

Hi Marco,

Try flipping the order. Liferay custom field comes on the left.

Best,
Shagul
Marco Paul Timbi Ulloa
RE: Mapping LDAP user data to Liferay user data
2010/12/29 11:29
答え

Marco Paul Timbi Ulloa

ランク: New Member

投稿: 5

参加年月日: 2010/12/13

最近の投稿

Hello my Friend I try but nothing!!! I have the version 6.0.5.

The rest of process with ldap work excellent, but need custom fields for Additional Information.

Another solution???
Shagul Khajamohideen
RE: Mapping LDAP user data to Liferay user data
2010/12/30 6:43
答え

Shagul Khajamohideen

ランク: Liferay Master

投稿: 759

参加年月日: 2007/09/27

最近の投稿

Hi Marco,

Did you create the custom fields through the control panel for the user object? I am running LR 6.0 EE with a whole bunch of custom fields without any issues.
Fernando Cevallos
RE: Mapping LDAP user data to Liferay user data
2010/12/30 6:44
答え

Fernando Cevallos

ランク: New Member

投稿: 2

参加年月日: 2010/10/11

最近の投稿

I had the same problem!! Can some one help me??
Fernando Cevallos
RE: Mapping LDAP user data to Liferay user data
2010/12/30 6:45
答え

Fernando Cevallos

ランク: New Member

投稿: 2

参加年月日: 2010/10/11

最近の投稿

Is there a solution for LR 6.0 CE??
Mourad EF
RE: Mapping LDAP user data to Liferay user data
2011/05/23 2:47
答え

Mourad EF

ランク: New Member

投稿: 21

参加年月日: 2011/02/12

最近の投稿

Hi,
Dis you successed to map Ldap photo to LR photo ?
I'm trying to do the same (with phone number also)
thanks
paurik bhavsar
RE: Mapping LDAP user data to Liferay user data
2011/05/27 3:43
答え

paurik bhavsar

ランク: New Member

投稿: 21

参加年月日: 2011/04/22

最近の投稿

try this in your jsp
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://localhost:10389");
env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.SECURITY_PRINCIPAL, "uid=admin,ou=system");
env.put(Context.SECURITY_CREDENTIALS, "secret");
env.put("java.naming.ldap.typesOnly", "true");
DirContext ctx = null;
NamingEnumeration results = null;
// Indicate that we only want the type names


try {

// Create initial context
ctx = new InitialDirContext(env);
// Get the attributes
Attributes attrs = ctx.getAttributes("cn=test,ou=system");
Attribute attr1 = attrs.get("telephoneNumber");

// Print the answer
System.out.println(attrs);
// Close the context when we're done
ctx.close();
} catch (NamingException e) {
e.printStackTrace();
}
Mourad EF
RE: Mapping LDAP user data to Liferay user data
2011/06/02 9:30
答え

Mourad EF

ランク: New Member

投稿: 21

参加年月日: 2011/02/12

最近の投稿

thank you for your reply .

I've done this using EXT environment, by modifying (extending) PortalLDAPImporterImpl.java
thanks to this post:
import phones from ldap

It works well for organization and telephoneNumber ... if you want more information tell me

Photos are not supported by LDAP (as far as i know), so I think i'm going to use your method to import photos from a directory in the server or something like that ... thanks

Mourad
Juan Gonzalez
RE: Mapping LDAP user data to Liferay user data
2012/03/05 8:08
答え

Juan Gonzalez

LIFERAY STAFF

ランク: Liferay Legend

投稿: 1970

参加年月日: 2008/10/28

最近の投稿

Mourad EF:
Hi,
Dis you successed to map Ldap photo to LR photo ?
I'm trying to do the same (with phone number also)
thanks


In Liferay 6.1 now you can map LDAP portrait with user portrait. Just use "portrait" in portal-ext.properties (LDAP user mappings section).
Jignesh Vachhani
RE: Mapping LDAP user data to Liferay user data
2012/05/04 6:37
答え

Jignesh Vachhani

ランク: Liferay Master

投稿: 780

参加年月日: 2008/03/10

最近の投稿

Yes right juan
Now in LR 6.1 its very easy to configure