I would like to access an authenticated samba share -- but the authentication needs to go though PAM and then though LDAP (Active Directory), as suggested in another question. The linux box is not joined to the AD.
PAM is set up correctly, I can issue a
login command and it authenticates against the AD backend. Samba is set up to use the same core
common-* files in
I unfortunately systematically get an access denied to that directory. I would really appreciate some help after googling for two days :)
In the config files below user joe exists in AD and on the linux server. The password on the linux server is different from the one on AD (it is random on linux - the expectation being to use the AD one). Logging to the joe account via
# smb.conf [global] workgroup = MYDOMAIN netbios name = myserver encrypt passwords = yes obey pam restrictions = yes unix password sync = Yes [mydir] path = /var/www/mydir valid users = joe write list = joe admin users = joe read only = No available = Yes # /etc/pam.d/samba @include common-auth @include common-account @include common-session-noninteractive # /etc/pam.d/common-auth auth [success=2 default=ignore] pam_unix.so nullok_secure auth [success=1 default=ignore] pam_ldap.so use_first_pass auth requisite pam_deny.so auth required pam_permit.so # /etc/pam.d/common-account account [success=2 new_authtok_reqd=done default=ignore] pam_unix.so account [success=1 default=ignore] pam_ldap.so account requisite pam_deny.so account required pam_permit.so # /etc/pam.d/common-session-noninteractive session [default=1] pam_permit.so session requisite pam_deny.so session required pam_permit.so session required pam_unix.so session optional pam_ldap.so