Forums de discussion

Modifying ldap password from liferay

Man V K, modifié il y a 14 années.

Modifying ldap password from liferay

Regular Member Publications: 138 Date d'inscription: 04/12/07 Publications récentes
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, modifié il y a 14 années.

RE: Modifying ldap password from liferay

New Member Publications: 16 Date d'inscription: 25/09/08 Publications récentes
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, modifié il y a 14 années.

RE: Modifying ldap password from liferay

Regular Member Publications: 138 Date d'inscription: 04/12/07 Publications récentes
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, modifié il y a 13 années.

RE: Modifying ldap password from liferay

New Member Publications: 10 Date d'inscription: 01/12/09 Publications récentes
I have the same problem...
Has anybody got a solution ?
thumbnail
Dmitry K, modifié il y a 11 années.

RE: Modifying ldap password from liferay

New Member Publications: 10 Date d'inscription: 21/01/13 Publications récentes
I have the same problem
thumbnail
amir keshavarz, modifié il y a 10 années.

RE: Modifying ldap password from liferay

Junior Member Publications: 54 Date d'inscription: 09/10/10 Publications récentes
Me too. Please help us emoticon
thumbnail
Antoine Comble, modifié il y a 10 années.

RE: Modifying ldap password from liferay

Regular Member Publications: 232 Date d'inscription: 07/09/12 Publications récentes
What version of liferay are you using ?

Antoine
thumbnail
amir keshavarz, modifié il y a 10 années.

RE: Modifying ldap password from liferay

Junior Member Publications: 54 Date d'inscription: 09/10/10 Publications récentes
Liferay 5.2.2
thumbnail
Antoine Comble, modifié il y a 10 années.

RE: Modifying ldap password from liferay

Regular Member Publications: 232 Date d'inscription: 07/09/12 Publications récentes
Can you send me the code where the error is.

Thanks.
thumbnail
amir keshavarz, modifié il y a 10 années.

RE: Modifying ldap password from liferay

Junior Member Publications: 54 Date d'inscription: 09/10/10 Publications récentes
As you can see there is a known error from LDAP:
[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' 


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:

ModificationItem[] modItems = mods.getItems();
ctx.modifyAttributes(name, modItems);
thumbnail
Antoine Comble, modifié il y a 10 années.

RE: Modifying ldap password from liferay

Regular Member Publications: 232 Date d'inscription: 07/09/12 Publications récentes
Hi Amir,

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

Regards,

Antoine
thumbnail
amir keshavarz, modifié il y a 10 années.

RE: Modifying ldap password from liferay

Junior Member Publications: 54 Date d'inscription: 09/10/10 Publications récentes
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.

ctx.modifyAttributes(name, modItems);


Many Thanks
Amir
thumbnail
Antoine Comble, modifié il y a 10 années.

RE: Modifying ldap password from liferay

Regular Member Publications: 232 Date d'inscription: 07/09/12 Publications récentes
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
thumbnail
amir keshavarz, modifié il y a 10 années.

RE: Modifying ldap password from liferay

Junior Member Publications: 54 Date d'inscription: 09/10/10 Publications récentes
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
thumbnail
Tonu Sri, modifié il y a 10 années.

RE: Modifying ldap password from liferay

Regular Member Publications: 197 Date d'inscription: 15/04/11 Publications récentes
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