The problem I am trying to solve is that I want to know if a certain PAM config file is being used or not.The latest version of IBM MQ (V8) provides a PAM file /etc/pam.d/ibmmq.  We're troubleshooting authtentication problems and I want to know if this file is being used or not.I thought I should be able to use pam_echo for this but I misunderstood that module's purpose.  pam_echo will display the contents of the file specified to the user.  This is not what I want I want to somehow log that a module is being called.
How to log messages from a pam module?
authentication;pam
I found the following solution that works but I'm open for other suggestions.pam_exec can be used to call external commands.  I'm using a very simple form to print a message to a log file.#%PAM-1.0auth    optional pam_exec.so log=/var/tmp/ibmmq.log /usr/bin/echo ibmmq authauth    include system-authaccount optional pam_exec.so log=/var/tmp/ibmmq.log /usr/bin/echo ibmmq accountaccount include system-authNote that the log= option needs to be specified before the command and that you need to fully qualify the paths.