Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Man V K
Modifying ldap password from liferay
April 21, 2010 2:23 AM
Answer

Man V K

Rank: Regular Member

Posts: 139

Join Date: December 4, 2007

Recent Posts

Hi ,

Iam cofigured my liferay with ldap, and works fine,

Iam trying to modify the password using API(UserLocalServiceUtil.updatePassword),

But it is not modiying the password of ldap, can any one suggest me how to change the passwword

of ldap using liferay api(UserLocalServiceUtil.updatePassword).

Man.
Thangavel k
RE: Modifying ldap password from liferay
April 21, 2010 3:22 AM
Answer

Thangavel k

Rank: New Member

Posts: 16

Join Date: September 24, 2008

Recent Posts

Hi,
Set the ldap.export.enabled=true in the portal-ext.properties file. Which will export the changes done to the portal will be exported to LDAP.
Or

In the control panel--> Settings-->Authentication--> LDAP. check the checkbox label "Export".

Both will do the same.


Hope this helps you.....


Thanks,
Thangavel.
Man V K
RE: Modifying ldap password from liferay
April 21, 2010 7:55 AM
Answer

Man V K

Rank: Regular Member

Posts: 139

Join Date: December 4, 2007

Recent Posts

Hi,

Thanks for the reply, I tried ur suggession, but i get following errors.

javax.naming.directory.SchemaViolationException: [LDAP: error code 67 - 000020B1
: UpdErr: DSID-030F0A48, problem 6004 (CANT_ON_RDN), data 0
]; remaining name 'CN=test test1,ou=p_s,dc=stm,dc=local'

at com.sun.jndi.ldap.LdapCtx.mapErrorCode(Unknown Source)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source)
at com.sun.jndi.ldap.LdapCtx.c_modifyAttributes(Unknown Source)
at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_modifyAttributes(Unkno
wn Source)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.modifyAttributes(
Unknown Source)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.modifyAttributes(
Unknown Source)
at javax.naming.directory.InitialDirContext.modifyAttributes(Unknown Sou
rce)
at com.liferay.portal.security.ldap.PortalLDAPUtil.exportToLDAP(PortalLD
APUtil.java:239)
at com.liferay.portal.model.UserListener.onAfterUpdate(UserListener.java
:40)
at com.liferay.portal.model.UserListener.onAfterUpdate(UserListener.java
:36)
at com.liferay.portal.service.persistence.UserPersistenceImpl.update(Use
rPersistenceImpl.java:448)
at com.liferay.portal.service.impl.UserLocalServiceImpl.updatePassword(U
serLocalServiceImpl.java:2115)
Jean Rombi
RE: Modifying ldap password from liferay
April 30, 2010 2:34 AM
Answer

Jean Rombi

Rank: New Member

Posts: 10

Join Date: December 1, 2009

Recent Posts

I have the same problem...
Has anybody got a solution ?
Dmitry K
RE: Modifying ldap password from liferay
February 7, 2013 4:52 PM
Answer

Dmitry K

Rank: New Member

Posts: 10

Join Date: January 21, 2013

Recent Posts

I have the same problem
amir keshavarz
RE: Modifying ldap password from liferay
July 7, 2013 11:32 PM
Answer

amir keshavarz

Rank: Junior Member

Posts: 54

Join Date: October 9, 2010

Recent Posts

Me too. Please help us emoticon
Antoine Comble
RE: Modifying ldap password from liferay
July 8, 2013 12:46 AM
Answer

Antoine Comble

Rank: Regular Member

Posts: 226

Join Date: September 7, 2012

Recent Posts

What version of liferay are you using ?

Antoine
amir keshavarz
RE: Modifying ldap password from liferay
July 8, 2013 12:48 AM
Answer

amir keshavarz

Rank: Junior Member

Posts: 54

Join Date: October 9, 2010

Recent Posts

Liferay 5.2.2
Antoine Comble
RE: Modifying ldap password from liferay
July 8, 2013 12:58 AM
Answer

Antoine Comble

Rank: Regular Member

Posts: 226

Join Date: September 7, 2012

Recent Posts

Can you send me the code where the error is.

Thanks.
Tonu Sri
RE: Modifying ldap password from liferay
July 8, 2013 8:57 AM
Answer

Tonu Sri

Rank: Regular Member

Posts: 196

Join Date: April 15, 2011

Recent Posts

Hi MAN,

As per your error log it says that:

javax.naming.directory.SchemaViolationException

Can you verify that all required attribute from LDAP are available in Liferay?

Please check your mapping.

Thanks:
Tonu
amir keshavarz
RE: Modifying ldap password from liferay
July 15, 2013 5:06 AM
Answer

amir keshavarz

Rank: Junior Member

Posts: 54

Join Date: October 9, 2010

Recent Posts

As you can see there is a known error from LDAP:
1[LDAP: error code 67 - 000020B1
2: UpdErr: DSID-030F0A48, problem 6004 (CANT_ON_RDN), data 0
3]; remaining name 'CN=test test1,ou=p_s,dc=stm,dc=local'


which Indicates that the modify operation attempted to remove an attribute value that forms the entry's relative distinguished name.

And this error is related to PortalLDAPUtil.exportToLDAP in below lines:

1ModificationItem[] modItems = mods.getItems();
2ctx.modifyAttributes(name, modItems);
Antoine Comble
RE: Modifying ldap password from liferay
July 15, 2013 5:12 AM
Answer

Antoine Comble

Rank: Regular Member

Posts: 226

Join Date: September 7, 2012

Recent Posts

Hi Amir,

Is ldap password field read only ?
Are you able to modify it using ldap command line ?

Regards,

Antoine
amir keshavarz
RE: Modifying ldap password from liferay
July 19, 2013 11:07 PM
Answer

amir keshavarz

Rank: Junior Member

Posts: 54

Join Date: October 9, 2010

Recent Posts

Hi Antonie,
Thanks for your reply.

I can change user password using JXplorer.
Actually Liferay's "password" is mapped into "User Password" in LDAP.
So no RDN entry is changing while below code is running and I'm wondering why Liferay shows "CANT_ON_RDN" error.

1ctx.modifyAttributes(name, modItems);


Many Thanks
Amir
Antoine Comble
RE: Modifying ldap password from liferay
July 20, 2013 12:14 AM
Answer

Antoine Comble

Rank: Regular Member

Posts: 226

Join Date: September 7, 2012

Recent Posts

Hi,

Can you check you're not in this situation :
http://issues.liferay.com/browse/LPS-29285?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Antoine
amir keshavarz
RE: Modifying ldap password from liferay
July 20, 2013 5:52 AM
Answer

amir keshavarz

Rank: Junior Member

Posts: 54

Join Date: October 9, 2010

Recent Posts

Yes,

I found that there is a problem between Liferay and AD:
This becomes an issue when using certain LDAP directories such as Active Directory (AD), because AD requires that the DN is contructed with the CN.


So I installed OpenDS and it is working fine. emoticon

Thanks Antonie