RE: Change default administrator

Peter Andreus, modified 5 Years ago. New Member Posts: 7 Join Date: 7/30/19 Recent Posts
Hi.
Im working with Liferay 7.3, specificly in docker environment with liferay/portal:7.3.1-ga2 image.
Default admin username and password is test/test as is mentioned in documentation:
https://docs.liferay.com/ce/portal/7.3-ga2/propertiesdoc/portal.properties.html#Default%20Admin

However, when i change env property LIFERAY_DEFAULT_PERIOD_ADMIN_PERIOD_PASSWORD to admin and LIFERAY_DEFAULT_PERIOD_ADMIN_PERIOD_SCREEN_PERIOD_NAME to admin, im still able to login as administrator only with test/test credentials.

I tried
Change ENV in my dockerfile
Change env in docker-compose.yml
Change default.admin.password and default.admin.screen.name in portal-ext.properties

Still no luck. Can anyone help me with correct setup?
Thanks
Peter Andreus, modified 5 Years ago. New Member Posts: 7 Join Date: 7/30/19 Recent Posts
After i added PostgresSql database to docker and setup Liferay to use it, all settings works now.
So basically issue was i was using shipped HSQL db.
thumbnail
David H Nebinger, modified 5 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts
Well, actually, the problem was more likely that these values are only used for the first time launch. If there is an existing database with the old test/test credentials, changing these properties will have no effect.


It's only when there is no existing database that these will be used when creating the admin account.
Peter Andreus, modified 5 Years ago. New Member Posts: 7 Join Date: 7/30/19 Recent Posts
Yes, That would be it.

I assumed that since i run Liferay in docker each start of container would be considered as first time launch.
However i would suggest to add some note to these properties which have effect first launch only to this documentation
Ruskin Ford, modified 5 Years ago. New Member Posts: 5 Join Date: 6/3/20 Recent Posts
You used the container to launch Liferay.
Every time a container begins it is considered to be a new and first process.If you would have started it outside the container then you would not have to use test/test again to login to the database every time.
thumbnail
David H Nebinger, modified 5 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts
The credentials are in the database. If all you have is a containerized app server pointing at an existing database, it doesn't matter what these properties are, the ones in the database will be used.

Likewise if the new container is pointing at a new database, these properties would be used in setting up the database and, going forward, if you used either a containerized app server or an app server outside the container were pointed at the existing database, they'd have to use the credentials defined by the instance which set up the database.

Container vs no container has nothing to do with this discussion.