How to use ldap for smb authentication?

First I have set ldap and it’s healthy, how should i use it ?
Second how should i connect ldap to smb?

There is a legacy mechanism to use TrueNAS as a de-factor NT-style domain controller, but the writing is on the wall for this (it is being removed in Electric Eel). It can be done by manually deploying a KDC and using kerberos for authentication and only Linux clients. Otherwise you need to look into using Active Directory.