Type  the following command to create user and apply password to the that user in linux system.
# useradd user1
# passwd user1  [not necessary because we will be applying password for smb user ]

Add a user to samba                                                                                                                                    # smbpasswd -a user1

Add a user to a Samab share in /etc/samba/smb.conf file

[share]
comment = share for specific directory
path = /usr/share
valid users = user1
public = no
writable = yes                                                                                                                                  browsable = yes

Restart the samba

# service smb restart

OR
# /etc/init.d/smb reload

Advertisements