6

I have an error popping up after upgrading to IBM MQ 8.0 from 7.5 reason being -

In MQ 8.0, a new function is introduced that requires MQ administrators using remote access to supply the userid and password. When the userid and password are not supplied or the password is incorrect

Error: 2035 Code : 2 The queue manager is configured to require a user ID and password, but none was supplied.

The problem is described better in this link. There are three scenarios that are talked about. My solution would fall in Scenario A) MQ samples: Provide the user and password to the MQ client application

I'm trying to read from the MQ using a program. Is there a way I can pass the username and password as part of the command line parameters rather than inputting it when prompted. Because this exe is invoked by my program.

$ amqsputc qName qMgr
JoshMc
  • 10,239
  • 2
  • 19
  • 38
Ganesh Kumar
  • 73
  • 1
  • 8

4 Answers4

4

IBM provides a client-side channel security exit called mqccred to perform this task. The full documentation is at the link provided but in general it requires the following:

  • Specify the exit in a CCDT file.
  • Configure the exit by placing ID and password in an ini file
  • Execute the runmqccred command against the ini file to obfuscate the passwords.
  • Make sure the ini file is set so that world- and group-read are disabled.

Note that Java/JMS programs can easily be modified and the exit is intended mainly for programs using the native C API or that are compiled on top of that.

T.Rob
  • 31,522
  • 9
  • 59
  • 103
4

If your client can't (yet) supply the username/password, you can disable the username/password requirement in the MQ 8.0 queue manager:

  1. Start MQ Explorer

  2. Go to Queue Managers<your_queue_manager>Authentication information

  3. Click "Show system objects" icon at top right

MQ Explorer / Authentication information / Show system objects

  1. SYSTEM.DEFAULT.AUTHINFO.IDPWOSUser ID + PasswordCheck client connections → Select Optional

MQ SYSTEM.DEFAULT.AUTHINFO.IDPWOS / User ID + Password / Check client connections / Optional

  1. Right-click on your queue manager → SecurityRefresh Authorization Service...

Right-click on queue manager, Security, Refresh Authorization Service

rustyx
  • 80,671
  • 25
  • 200
  • 267
0

Have you tried providing the password with heredoc, like this?

amqsputc qName qMgr <<< "passwd"

Send string to stdin

Community
  • 1
  • 1
Attila Repasi
  • 1,803
  • 10
  • 11
0

The MQ samples were updated to allow a user ID to be specified and, if set, to prompt you to enter your password: MQ Bitesize Blogging

Some take a new optional command line parameter [-u User], others check for the presence of the MQSAMP_USER_ID environment variable.