Ubuntu - PAM - Check is a program can use PAM

To employ PAM, an application needs to be “PAM aware“.

It needs to have been written and compiled specifically to use PAM.

To find out if a program is “PAM-aware” or not, check if it has been compiled with the PAM library using the ldd command


Example

Check if Samba can use PAM.

sudo ldd /usr/sbin/samba | grep libpam.so

returns:

	libpam.so.0 => /lib/x86_64-linux-gnu/libpam.so.0 (0x00007f5eb06fd000)

This shows that PAM can be used.