# Samba and Pam

## Vlad

I know I'm not the only one with this problem, but have been unable to find any solutions.

I have a samba server on a computer.  I use it to share files with my windows clients.  Everyone can access the share, change the files, etc, just fine, but I see this message everytime someone accesses the share:

From /var/log/log.smbd:

```

[2002/06/06 14:00:35, 0] passdb/pampass.c:smb_pam_passcheck(827)

  smb_pam_passcheck: PAM: smb_pam_auth failed - Rejecting User smbuser !

[2002/06/06 14:00:36, 0] passdb/pampass.c:smb_pam_passcheck(827)

  smb_pam_passcheck: PAM: smb_pam_auth failed - Rejecting User smbuser !

[2002/06/06 14:03:26, 0] passdb/pampass.c:smb_pam_passcheck(827)

  smb_pam_passcheck: PAM: smb_pam_auth failed - Rejecting User smbuser !

[2002/06/06 14:18:07, 0] passdb/pampass.c:smb_pam_passcheck(827)

  smb_pam_passcheck: PAM: smb_pam_auth failed - Rejecting User smbuser !

[2002/06/06 14:22:17, 0] passdb/pampass.c:smb_pam_passcheck(827)

  smb_pam_passcheck: PAM: smb_pam_auth failed - Rejecting User smbuser !

```

I've tried altering the /etc/pam.d/samba but with no luck.  I've also fiddled with options in /etc/samba/smb.conf (like pam restrictions, security=share/user) and still no luck.

Now, /etc/samba/smbpasswd has an entry for the smbuser and /etc/samba/smbusers has the appropriate unix to samba users mapped.

So I'm left clueless. Everything looks like it should work fine. And from the error messages, I'm assuming it's a problem with pam<-->samba (/etc/pam.d/samba).  Incase anyone wants to look, here's a copy of that file:

(uncommented settings were tested and failed)

```

# pam_smbpass.so authenticates against the smbpasswd file

#auth      optional     /lib/security/pam_pass.so nullok shadow nodelay 

#account   optional     /lib/security/pam_pwdb.so nodelay

Auth    required        /lib/security/pam_smbpass.so nullok shadow

Account required        /lib/security/pam_smbpass.so

#auth       required     /lib/security/pam_smbpass.so nodelay nullok shadow

#account    required     /lib/security/pam_pwdb.so audit nodelay

#session    required     /lib/security/pam_pwdb.so nodelay

#password   required     /lib/security/pam_smbpass.so nodelay smbconf=/etc/samba

/smb.conf

```

----------

