Encrypting database passwords in configuration files
To encrypt the database passwords stored in configuration files, follow the steps in this procedure.
Procedure
- Navigate to the MDM_INSTALL_HOME\mds\bin directory.
and invoke the following command:
Wheremadpwd2 -e <password_value>
<password_value>
is the unencrypted password value.The results of the command include a value labeled ENCRYPTED. This is the encrypted password. - Copy the value labeled ENCRYPTED.
- Open the file MDM_INSTALL_HOME\mds\conf\com.ibm.mdm.mds.jdbc.cfg and
replace the line
with the following line:password=<password_value>
password2=<encrypted_password_value>
Note: Ensure that the keypassword
is modified topassword2
. - On the application server, open the file MDM_PROFILE_HOME\installedApps\<CELL_NAME>\MDM-native-<INSTANCE_NAME>.ear\native.war\conf\com.ibm.mdm.mds.jdbc.cfg and
replace the line
with the following line:password=<password_value>
password2=<encrypted_password_value>
Note: Ensure that the keypassword
is modified topassword2
. - Open the file MDM_INSTALL_HOME\mds\conf\com.ibm.mdm.mds.jni.cfg and
replace the line
with the following line:MAD_CONNSTR=DSN\=<DSN_VALUE>;UID\=<USER_ID>;PWD\=<PASSWORD_VALUE>
MAD_CONNSTR=DSN\=<DSN_VALUE>;UID\=<USER_ID>;PWD2\=<ENCRYPTED_PASSWORD_VALUE>
Note: Ensure that the keyPWD
is modified toPWD2
. - On the application server, open the file MDM_PROFILE_HOME\installedApps\<CELL_NAME>\MDM-native-<INSTANCE_NAME>.ear\native.war\conf\com.ibm.mdm.mds.jni.cfg and
replace the line
with the following line:MAD_CONNSTR=DSN\=<DSN_VALUE>;UID\=<USER_ID>;PWD\=<PASSWORD_VALUE>
MAD_CONNSTR=DSN\=<DSN_VALUE>;UID\=<USER_ID>;PWD2\=<ENCRYPTED_PASSWORD_VALUE>
Note: Ensure that the keyPWD
is modified toPWD2
.