I have a client that has made many changes in the PAM files and now things they want to be configured does not work.

How can one debug the PAM stack and see how it behave while we try to login from different source being ssh, su, sudo, login, etc?

Google has not been very useful so far. I hope there is a way to do it.

Environment:
pgiststinf06:~ # lsb_release -a
LSB Version: n/a
Distributor ID: SUSE
Description: SUSE Linux Enterprise Server for SAP Applications 12 SP2
Release: 12.2
Codename: n/a

pgiststinf06:~ # arch
ppc64le


Thanks,