Bootstrap FreeKB - IBM MQ - LDAP
IBM MQ - LDAP

Updated:   |  IBM MQ articles

A queue manager can be configured to use an LDAP server to obtain users and groups as part of authentication. The display qmgr command can be used to determine if the queue manager is configured to use LDAP. In this example, the queue manager named MANAGER01 is using MANAGER01.LDAP.AUTHINFO.

~]# echo "display qmgr" | runmqsc MANAGER01
CONNAUTH(MANAGER01.LDAP.AUTHINFO)

 

The display authinfo command can be used to get the hostname(s) of the LDAP systems being used, the LDAP Base Distinguished Name (DN), and the LDAP user being used for LDAP queries.

~]# echo "display authinfo ('MANAGER01.LDAP.AUTHINFO')" | runmqsc MANAGER01
AUTHTYPE(IDPWLDAP)
CONNAME(ldap1.example.com(389),ldap2.example.com(389))
BASEDNU(ou=mq,ou=appmgmt,ou=svcs,o=acme)
LDAPUSER(CN=admin,ou=mgmt,ou=svcs,o=acme)

 

The display qmstatus command can be used if the queue manager is running and connected to LDAP.

~]# echo "display qmstatus all" | runmqsc MANAGER01
STATUS(RUNNING)
LDAPCONN(CONNECTED)

 

The ldapsearch command can then be used to search for user in LDAP.

  • The -x option means to use basic authentication instead of SASL.
  • The -b option is the base LDAP distinguished name (DN)
ldapsearch -x -b ou=mq,ou=appmgmt,ou=svcs,o=acme cn=JohnDoe

 

Following is an example of what could be returned by the ldapsearch command.

dn: uid=JohnDoe,ou=People,dc=example,dc=com
uid: JohnDoe
cn: JohnDoe
sn: JohnDoe
mail: JohnDoe@example.com
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
userPassword: {crypx}asldfjalkfjaslkfavkjalkalkvjalkvjalfjadofiasoifjelemlaemlakemla
shadowLastChange: 17483
shadowMin: 0
shadowMax: 99999
shadowWarning: 7
loginShell: /bin/bash
uidNumber: 1001
gidNumber: 1001
homeDirectory: /home/JohnDoe
gecos: JohnDoe

dn: cn=admins,ou=Group,dc=example,dc=com
objectClass: PosixGroup
objectClass: top
cn: admins
userPassword: {crypt}x
gidNumber: 1003
memberUid: JohnDoe



Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter f3d3d8 in the box below so that we can be sure you are a human.