Pam winbind Link

From SambaWiki
Jump to: navigation, search


To enable users to authenticate to an NT4 or Active Directory (AD) domain, PAM must be able to locate the library provided by Samba. Create a link in the PAM modules directory to enable PAM to use Winbind.

Determining the Platform

To determine the operating system's platform:

# uname -m

Verifying If PAM Support Is Enabled

To verify if Samba was build with PAM support, enter:

# smbd -b | grep "WITH_PAM"

If the WITH_PAM option is not shown in the command's output, Samba was built without PAM support, because:

  • The configure script failed to locate the PAM headers.
  • The --without-pam option was passed to the configure script.

To enable PAM support:

  • Install the PAM headers. For example, on Red Hat Enterprise Linux, the headers are provided in the pam-devel package.
  • Rebuild Samba without passing the --without-pam option to the configure script. For details about building Samba, see Build Samba from Source.

Locating the Library

If you built Samba, the location of the library was set using the configure script's --with-pammodulesdir parameter. The default location is /usr/local/samba/lib/security/

To locate the library, run:

# find / -type f -name

Link the library from this directory to your operating system's PAM module directory.

Operating System-specific Examples

Red Hat-based Operating Systems


# ln -s /usr/local/samba/lib/security/ /lib64/security/


# ln -s /usr/local/samba/lib/security/ /lib/security/

Debian-based Operating Systems


# ln -s /usr/local/samba/lib/security/ /lib/x86_64-linux-gnu/security/


# ln -s /usr/local/samba/lib/security/ /lib/i386-linux-gnu/security/

SUSE-based Operating Systems


# ln -s /usr/local/samba/lib/security/ /lib64/security/


# ln -s /usr/local/samba/lib/security/ /lib/security/