[Samba] Unix to SMB Password Sync using PAM

Charles McLaughlin cmclaughlin at ucdavis.edu
Thu Apr 7 17:35:17 GMT 2005


I would like to configure PAM to sync Unix passwords to Samba passwords. 
  When I add a new Unix user or change an existing Unix user's password, 
I want the same password to be stored in /etc/smbpasswd.

I'm trying to follow these instructions:

It sounds like this is what I want to do:
  "A sample PAM configuration that shows the use of pam_smbpass to make 
sure private/smbpasswd is kept in sync when /etc/passwd (/etc/shadow) is 

I created the file /etc/pam.d/passwd-sync and pasted the following:

# password-sync
auth       requisite    pam_nologin.so
auth       required     pam_unix.so
account    required     pam_unix.so
password   requisite    pam_cracklib.so retry=3
password   requisite    pam_unix.so shadow md5 use_authtok try_first_pass
password   required     pam_smbpass.so nullok use_authtok try_first_pass
session    required     pam_unix.s

Then I rebooted and changed my Unix password using "passwd", but that 
didn't change my smbpassd.  I checked to make sure I have all of the 
needed PAM modules, but other than that I don't know what to look for. 
Am I missing something?  Any ideas?

Thanks in advance.


More information about the samba mailing list