Yes PAM is way of linux authentification system. But I believed it is meant for local system. For server authentification system, PAM alone isn't enough, that's why LDAP and pam-ldap comes into hand. Forget about samba, it's different thing,samba only comes later, after user being authenticate.