I think that you will find this very helpful: http://www.samba.org/samba/docs/man/Samba-Guide/happy.html It deals with the configuration of Samba with a LDAP backend.