1. add user to Linux system:
    adduser user1
  2. add user to samba:
    smbpasswd -a user1
  3. create group:
    groupadd group1
  4. add user to group:
    usermod -G group1 user1
  5. add user to different groups:
    usermod -G group1,group2,group3 user1

change the ownership of the folder:

chgrp group1 /path/OfYourSharedFolder

give read/write access to your shared folder:

chmod 770 /path/OfYourSharedFolder