Pretty simple. First have to make sure that you have a system user with the same user name added first:
Good article for that: http://www.ahinc.com/linux101/users.htm
Then, in Red Hat type distros you’ll need the smbpasswd file which contains the samba user names and passwords.
To add a new samba user:
smbpasswd -a [username]
To delete a samba user:
smbpasswd -x [username]