In previous versions of Message Queue, you could use the —p or —password option to specify a password interactively for the following commands: imqcmd, imqbrokerd, and imdbmgr. Beginning with version 4.0, these options have been deprecated.
Instead, you can create a password file that specifies the relevant passwords and reference the password file using the -passfile command option, or simply enter a password when prompted by the command.
A password file can contain one or more of the passwords listed below.
A keystore password used to open the SSL keystore. Use the imq.keystore.password property to specify this password.
An LDAP repository password used to connect securely with an LDAP directory if the connection is not anonymous. Use the imq.user_repository.ldap.password property to specify this password.
A JDBC database password used to connect to a JDBC-compliant database. Use the imq.persist.jdbc.vendorName.password property to specify this password. The vendorName component of the property name is a variable that specifies the database vendor. Choices include hadb, derby, pointbase, oracle, or mysql.
A password to the imqcmd command (to perform broker administration tasks). Use the imq.imqcmd.password property to specify this password.
In the following example, the password to the JDBC database is set in the password file to abracadabra.
imq.persist.jdbc.mysql.password=abracadabra
You can use a password file in one of the following ways.
Configure the broker to use the password file by setting the following properties in the broker's config.properties file.
imq.passfile.enabled=trueimq.passfile.dirpath=passwordFileDirectoryimq.passfile.name=passwordFileName
Use the -passfile option of the relevant command, for example:
imqbrokerd -passfile passwordFileName