Add user to linux user with command below
useradd peter
passwd peter
New password: *******
Retype new password: ********
smbpasswd –a peter
New SMB password: ********
Retype new SMB password:********
Add a user to a Samab share
By default user gets access to /home/peter from windows system. Let us say you want to give peter access to /data/accounts (make sure directory /data/accounts exists) directory. Open /etc/samba/smb.conf file and add/modify share called [accounts]:
[accounts]
comment = Accounts data directory
path = /data/accounts
valid users = user1 user2 peter
public = no
writable = yes
save the file
restart samba: service smb restart