Having "PAM adding faulty module: pam_winbind.so", "… pam_kwallet5.so", "… pam_kwallet.so" on start of smbd, ssh, cron daemons - why and how to fix?

I'm using Ubuntu 16.04.5 LTS. I tried to read my log files for errors. The most interesting are the following:

cat /var/log/auth.log | egrep "unable|faulty"

Nov 25 13:25:13 localhost su[4491]: PAM unable to dlopen(pam_winbind.so): /lib/security/pam_winbind.so: cannot open shared object file: No such file or directory
Nov 25 13:25:13 localhost su[4491]: PAM adding faulty module: pam_winbind.so
Nov 25 13:25:13 localhost systemd: PAM unable to dlopen(pam_winbind.so): /lib/security/pam_winbind.so: cannot open shared object file: No such file or directory
Nov 25 13:25:13 localhost systemd: PAM adding faulty module: pam_winbind.so
Nov 25 13:29:21 localhost smbd: PAM unable to dlopen(pam_winbind.so): /lib/security/pam_winbind.so: cannot open shared object file: No such file or directory
Nov 25 13:29:21 localhost smbd: PAM adding faulty module: pam_winbind.so
Nov 25 13:39:01 localhost CRON[5247]: PAM unable to dlopen(pam_winbind.so): /lib/security/pam_winbind.so: cannot open shared object file: No such file or directory
...
Nov 26 23:53:53 localhost lightdm: PAM adding faulty module: pam_kwallet.so
Nov 26 23:53:53 localhost lightdm: PAM unable to dlopen(pam_kwallet5.so): /lib/security/pam_kwallet5.so: cannot open shared object file: No such file or directory
Nov 26 23:53:53 localhost lightdm: PAM adding faulty module: pam_kwallet5.so
Nov 26 23:53:53 localhost lightdm: PAM unable to dlopen(pam_winbind.so): /lib/security/pam_winbind.so: cannot open shared object file: No such file or directory
...

The system integrity is correct - debsums --config --changed does not report any changes in /etc/pam.d directory.

The library files are not installed:

$ dpkg -S pam_winbind.so
dpkg-query: no path found matching pattern *pam_winbind.so*

$ dpkg -S pam_kwallet.so
dpkg-query: no path found matching pattern *pam_kwallet.so*

$ dpkg -S pam_kwallet5.so
dpkg-query: no path found matching pattern *pam_kwallet5.so*

Why are these messages exist in /var/log/auth.log? Should I fix them?


These warnings may be removed by installation of the corresponding packages:

sudo apt-get install libpam-kwallet4 libpam-kwallet5 libpam-winbind

But I got the interesting result - my user is listed only in its group.

Fixed this problem by removing both kwallet packages:

sudo apt-get purge libpam-kwallet4 libpam-kwallet5

The mentioned KWallet problem is known on LaunchPad as bug 1781418.


So it was a bad idea to remove these warnings. I'll remove PAM winbind too for sure:

sudo apt-get purge libpam-winbind