Is there a reason you cannot use samba group policy objects, sssd or one of the other solutions out there?