How to integrate pam with winbind

To use samba with winbind for your pam authentication, you have to edit the process file (e.g. apache2) under /etc/pam.d/ and add the following lines:

  1. #%PAM-1.0
  2. auth    required        pam_winbind.so
  3. account required        pam_winbind.so

If you are already using a configuration, you can add the winbind authentication by simply changing “required” to “sufficient”. The order of the plugins in the file matters to the order of authentication.

The following configuration tries to authenticate against winbind and if this fails, against the unix module.

  1. auth    sufficient      pam_winbind.so
  2. auth    required        pam_unix.so

Leave a Reply