Because each imqcmd subcommand is authenticated against the user repository, it requires a user name and password. The only exceptions are commands that use the -h or -H option to display help, and commands that use the -v option to display the product version.
Use the -u option to specify an administrative user name. If you omit the user name, the command prompts you for it. For example, the following command displays information about the default broker:
imqcmd query bkr -u admin
To make the examples in this chapter easy to read, the default user name admin is shown as the argument to the -u option. In a production environment, you would use a custom user name.
Specify the password using one of the following methods:
Create a password file (passfile) and enter the password into that file. On the command line, use the -passfile option to provide the name of the password file.
Let the command prompt you for the password.
In previous versions of Message Queue, you could use the -p option to specify a password on the imqcmd command line. This option is being deprecated and will be removed in a future version.