In an previous post, we advised changing the database password for the private user in order to improve the security of your Primavera P6 database. However, once either the private or public user database users have had their password changed, nobody will be able to access the Primavera P6 database from any of Oracle Primavera’s applications.
In this post we’ll explain what needs to be done, once the DBA has changed the password for either of these users. The private user is normally called privuser and the public user is normally called pubuser, although they can be called anything. The private user in Oracle XE is called PRIVPRM$PM and the public user is called PUBPRM$PM. The default Oracle Primavera P6 installation will create them with the password set to the user name. Not very secure!
For the sake of this post we’ll use privuser to refer to the private user and pubuser for the public user. You’ll just have to translate it into whatever names you are using. We’ll start at the moment immediately after the DBA has changed the password of privuser to ‘secret’ and the public user to ‘not-telling’. We’ll cover the P6 Windows Client, Web Application and Integration API.
Oracle Primavera P6 Windows Client
Changing The Private User Password
The first thing we have to do is deal with the change to the privuser password. This only needs to be done once. Start the Oracle P6 Windows Client and click the ellipses button next to the Database entry to display a list of all configured database connections. Select the Database Connection that will connect you to the database where the privuser password was changed.
Click on the Configure button to display the Select or Create Alias screen of the Database Configuration dialog. Click on the Back button for each screen until you come to rest on the What would you like to do? screen of the dialog.
Select the radio button for Administration Tasks and then click on the Next button to see the Select Administration Task dialog. Select the Administer private database logins option and then click on the Next button to continue.
Select the correct type of database and database alias from the Select Database Alias dialog that is displayed. Make sure you select the correct database. Once done click on the Next button to move to the next screen.
This screen has no sub-title like the rest, but it does have three text boxes, two of which are empty. You should enter the name of your private user (privuser) into the Username text field and the password (‘secret’) into the Password text field. This is required to be able to connect to the Oracle Primavera P6 database and make the necessary changes.
The *Alias* text field should be filled in for you.
Click the Next button to display a dialog that tries to explain the public group id and how it relates to privuser and pubuser. Primavera P6 allows you to use any number of public users and each one has to paired with a private user. It does this through something called the public group id. In most instances of Primavera P6 we have ever come across in the real world, the public group id is 1.
As you’ll see later on, the pubuser is assigned to a connection with a public group id. Oracle Primavera P6 first connects to the database as pubuser and reads a row in the PUBUSER table that has a PUBLIC_GROUP_ID column set to the value supplied when creating the connection. This table contains a column that holds the privuser name and one that holds the encrypted password for privuser. Having got those two, it logs onto the database using them, and then it validates the username and password entered to login to Primavera P6. Primavera P6 applications always run as the privuser database user.
Click the Next button to be able to enter the privuser password. This screen can be a little strange to use. Unless you have been experimenting with the public group id, there will be just one row with two columns in it as in the screenshot below. Simply select the row and enter the password in the text box below. You may be tempted to click the Add button but that will add another row, which you’ll just have to delete by clicking the Delete button.
Once you have entered the correct password click the Finish button and you’ve changed the privuser password in the application. It’s amazing that you have to go through all that effort just to tell the Primavera P6 application what the new password is.
Changing the pubuser password is only slightly less difficult. Let’s take a look at how to do this.
Changing The Public User Password
We now take a look at what’s involved in changing the pubuser password. This has to be done on every client machine, which is why running under Citrix helps or simply not bothering to change the pubuser password in the first place. As before, start the Oracle P6 Windows Client and click the ellipses button next to the Database entry to display a list of all configured database connections. Select the Database Connection that will connect you to the database where the privuser password was changed.
Click on the Configure button to display the Select or Create Alias screen of the Database Configuration dialog. Then click the Next button twice until you come to the Enter Public Login Information screen.
Enter the username and password for the pubuser database user and click the Next button to display the Validate Database Connection screen.
Click Next again and Primavera P6 will attempt to connect to the database. You should now see the Connection Successful screen. All you now need to do is click the Finish button and congratulate yourself on a job well done. Unless of course you have 300 users, all using P6 from their own computers. In that case, you could give them these instructions or your own version and let them get on with it.
Oracle Primavera P6 Web Or Java API
The information here includes the INTERNAL_PLUGINS as well as anything that users the Java API. This is actually very simple on one level, but because of the large number of possibilities, you may have to work out exactly what you need to do for your specific situation. The principle is very easy though.
First you have to configure the bootstrap file to contain the correct pubuser password. That is, of course, if it points to the database with the newly changed password. Then you will need to use the Configuration Administration application and change a setting against the database instance.
We won’t describe here how to setup the pubuser password in the connection file because it is well documented and simple. As a reminder you have to run the dbconfig.cmd or dbconfig.sh script file for windows or linux respectively.
Changing the configuration for the pubuser database user is almost as easy. You will need to start the Configuration Administration application by running the admin.cmd or admin.sh command. You’ll need the privuser password and username and once through that you will be in the administration application.
Expand the configurations you need to change. It is likely that INTERNAL_PLUGINS will need to be updated as well as any Web Access or Java API configurations you have setup. If you are not sure, then just expand every database instance node and check if it is your database. The URL entry here should provide all the clues you need along with the User Name entry. Where these match your database just change the Password to the new value for pubuser.
Click the Save Changes button, the confirmation and exit the application.
For more Primavera P6 articles click here