RE: How to change database password from admin login ?

Jamie Sammons, modified 4 Years ago. New Member Posts: 18 Join Date: 4/19/19 Recent Posts

Hi,

I want to change liferay database password from admin login, which will auomatically update in "portal-ext.properties" file.

Currently I am doing this change through properties file update manually and restart server, which is a time taking activity.

Anyone know this process ?

 

 

 

thumbnail
Sergio Sanchez, modified 4 Years ago. Regular Member Posts: 149 Join Date: 7/6/11 Recent Posts

Hey Deepak, it's not possible to do it trough UI in Control Panel.

The only way is by changing it in portal-ext.properties file.

Maybe some tool like Puppet or a similar one, can aid you in the manual process. In any case, it requires a full restart as it a change in a file loaded by the application cllassloader.

Other way could be suing the JDBC pool in the App Server and check if changing, closing and opening the pool again is something that is transparent for Liferay Portal/DXP.

thumbnail
David H Nebinger, modified 4 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts

In my configurations I never want to use the portal-ext.properties file.

Instead, DB passwords should be set in the JNDI configuration. If you are using an advanced JEE server, sometimes you can change the password using the server's admin console.

But for security reasons, you'd never want Liferay exposing or setting the DB credentials. If a hacker were to gain entry into your environment they could wreak all kinds of havoc on you by being able to change these values.

In any case, your current thing won't really benefit much by any change. Liferay needs to be restarted if you change the database (it is not a live setting that would be propagated), so you're stuck having to shut down the container anyway.