It appears that pam_smbpass does not initialize several internal variables from parameters in the config file or does not set them to defaults when they are not in the config file. This manifests as syslog messages with: Cannot access samba password database Performing a "truss" on a test application one can see some strange open() system calls: 20247: open64("/secrets.tdb", O_RDWR|O_CREAT, 0600) = 3 20247: open64("", O_WRONLY|O_APPEND|O_CREAT, 0644) Err#2 ENOENT 20247: open64("", O_WRONLY|O_APPEND|O_CREAT, 0644) Err#2 ENOENT I _know_ I don't have my private dir set to "/" and I don't know what it is trying to open that has a value of "". I know it successfully opens the config files: 20247: open64("/etc/ulcmit/samba/smb.conf.pamsmbpass", O_RDONLY) = 3 20247: open64("/etc/ulcmit/samba/smb.conf", O_RDONLY) = 3 (The former is set with the smbconf= pam config, the latter is an included file). If I set smbconf=/dev/null, the defaults lead to the same problem. If I do a "testparm -s" to a file and use that, the same problem. The smbd, nmbd, smbstatus, et.al. all work fine on this system. This was built using gcc 3.2.3 using: ./configure \ --prefix=/opt/ulcmit \ --sysconfdir=/etc/ulcmit \ --localstatedir=/var/ulcmit \ --with-configdir=/etc/ulcmit/samba \ --with-privatedir=/var/ulcmit/samba/private \ --with-lockdir=/var/ulcmit/samba/locks \ --with-piddir=/var/ulcmit/samba/locks \ --with-logfilebase=/var/ulcmit/samba/log \ --without-readline \ --with-ldap \ --with-acl-support \ --with-quotas \ --with-utmp \ --enable-cups \ --without-winbind \ --with-pam_smbpass \ --with-ldapsam
I had the same problem with nss_config.h. The compiler searched and included the wrong <config.h>! In my case it was from /usr/local/mysql/include. Quick hack solution: try and replace #include <config.h> with #include "../include/config.h"
this is fixed.