Change password for user install in Bonita 7.3

1
0
-1

Hi,

I'm installing Bonita BPM Community Tomcat Bundle 7.3.0.

I'd like to change the password for the user "install", but the documentation is confusing, just like previous versions.

Any help?

Regards,
Jose.

3 answers

1
+3
-1
This one is the BEST answer!

Hi all,

I've done these steps and finally been able to change install password:

1) Modify database.properties to set the database connection parameters and proper vendor
2) Drop all tables in bonita control database schema
3) Execute "setup.sh init"
4) Execute "setup.sh pull", and now all config files has been downloaded properly
5) Change password of install user in these 2 files (Only uncomenting the lines related with user/pwd not anymore)

setup/platform_conf/current/platform_portal/platform-tenant-config.properties
setup/platform_conf/current/tenant_template_engine/bonita-tenant-community-custom.properties

6) Execute "setup.sh push"
7) Restart

In my opinion, this is such a mandatory task, that should be explained much better in the documentation!

Hope it helps,
Regards,
Jose.

Comments

Submitted by chris.lowth on Fri, 01/06/2017 - 21:38

Hmm .. thought I'd cracked this. But seems not.
It looks very much as if the studio has the user name and password hard coded.

Submitted by chris.lowth on Mon, 01/09/2017 - 14:10

I've had to do some investigation into this myself because I really don’t relish dropping all the tables in the journal db (aka: control db) just to change a password.

My lazy-developer's view is that it needs to be easy to change this password without having to re-import all your users, groups, apps, etc afterwards.

And (mercifully) it seems that it IS possible - but it gets a tad ugly if you want to change it for a development Bonita instance.

The following is for version 7.3.2, chances are it'll work for other near releases too - but I havent tested it.

The full logic is...

1) Modify database.properties to set the database connection parameters and proper vendor
2) Execute "setup.sh pull", and now all config files has been downloaded properly
3) Change name and password of install user in the following files (Only uncommenting the lines related with user/pwd not anymore) in the "setup/platform_conf/current" directory...

-- platform_portal/platform-tenant-config.properties
-- tenant_template_engine/bonita-tenant-community-custom.properties
-- current/current/tenants/1/tenant_engine/bonita-tenant-community-custom.properties

4) Execute "setup.sh push"
5) Restart the bonita engine

Now .. you have a problem if you are trying to change the bonita instance that you want to work on with the studio because the studio as the default name and password hard coded into it (ugh!). To get round this you need to download and build bonita from source (the community web site documentation tells you how), then edit the file..

-- bonita-studio/bundles/plugins/org.bonitasoft.studio.engine/src/org/bonitasoft/studio/engine/BOSEngineManager.java

To change the values stored for the string constants..

-- BONITA_TECHNICAL_USER
-- BONITA_TECHNICAL_USER_PASSWORD

And edit ..

-- bonita-studio/bundles/plugins/org.bonitasoft.studio.engine/src/org/bonitasoft/studio/engine/operation/AbstractBonitaURLBuilder.java

To use the BOSEngineManager constants from above in the toTechnicalUserLoginURL function in place of the hard-coded values.

And finally, edit ..

-- bonita-studio/bundles/plugins/org.bonitasoft.studio.engine/src/org/bonitasoft/studio/engine/BOSWebServerManger.java

To correct a typo in the "connectWithRetries" function, which (as it stands) uses the wrong parameters for the login() function call. You'll see it refers to BONITA_TECHICAL_USER twice but the 2nd parameter should refer to BONITA_TECHNICAL_USER_PASSWORD.

Then rebuild with the changes

-- mvn clean install -Dmaven.test.skip=true

Once the build has completed with errors, replace the installed plugins/org.bonitasoft.studio.engine_*.jar with the just-built new one.

(I said it was ugly).

For my own purposes, I've gone a step further and changed the studio to get the username and password to use from the file platform-tenant-config.properties file, created and editted in steps 2 and 3 above. This means that future changes are just a matter of running steps 1 through 5 above, and no futher hacks to the source code is required.

1
0
-1

I don't really know sorry

Did you try with another password ? Make sure you do not insert white spaces.

Comments

Submitted by josegante on Tue, 07/26/2016 - 16:47

Is it normal that pull (extract) command doesn't generate any file?

(No white spaces)

Submitted by raphael.le-gora... on Tue, 07/26/2016 - 16:51

It should download file in the "current" folder.

If not, try to run the "setup.sh init" before. (but it might tell you that the database is already initiated)

Submitted by josegante on Tue, 07/26/2016 - 16:53

sudo ./setup.sh init:
"16:51:39.543|INFO |o.b.p.s.PlatformSetup| Platform is already created. Nothing to do."

sudo ./setup.sh pull:
16:51:55.792|INFO |o.b.p.s.PlatformSetup| Pulling configuration into folder: platform_conf/current
16:51:55.813|INFO |o.b.p.s.PlatformSetup| Configuration (and license) files successfully pulled. You can now edit them. Use "setup push" when done.

But no files at all under setup/platform_conf/current

:-(

Submitted by raphael.le-gora... on Tue, 07/26/2016 - 16:54

This is another problem ... Can't help you sorry

1
0
-1

Edit the file in /tomcat/setup/platform_conf/initial/platform_portal/platform-tenant-config.properties

If your Bonita installation is already deployed and the database is filled, you need to run the script setup.sh with the parameter "pull" (to extract data from the base), then edit the file (remplace "init" by "current" in the path) and then run the script setup.sh with the "push" parameter.

Comments

Submitted by josegante on Tue, 07/26/2016 - 16:39

Thanks for your help Raphael.

1) I've executed "setup pull"
2) I've put file: /opt/BonitaBPM/BonitaBPMCommunity-7.3.0-Tomcat-7.0.67/setup/platform_conf/current/bonita-tenant-community-custom.properties
....with everything commented except:

userName=install
userPassword=xxxxxx

3) I've executed "setup push"

No errors message, and when restarted, I get this exception in log, and login page is not rendered properly!

2016-07-26 16:32:49.859 +0200 SEVERE: org.bonitasoft.console.common.server.servlet.PlatformTenantListener Error while initializing the default tenant
org.bonitasoft.engine.platform.LoginException: User name is null or empty !!
at org.bonitasoft.engine.api.impl.LoginAPIImpl.checkUsernameAndPassword(LoginAPIImpl.java:149)
at org.bonitasoft.engine.api.impl.LoginAPIImpl.loginInternal(LoginAPIImpl.java:107)
at org.bonitasoft.engine.api.impl.LoginAPIImpl.login(LoginAPIImpl.java:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

Any ideas?

Submitted by Sean McP on Wed, 07/27/2016 - 03:18

did you comment everything else out? If so I probably wouldn't have done that.

Init would just replace what's already there, from the pull, so no harm. Ideally yes it should work with just the things you wanted to change but it's possible Init literally clears everything and adds only the stuff it finds in your file.

regards
Seán

Submitted by josegante on Wed, 07/27/2016 - 08:44

Thanks for your help Sean.

I only uncomment the 2 lines of user/pwd for install user.

Is there any way in the doc where clearly explains how to change the install password?

Notifications