For installing samba, we download it’s package and install it through yum or rpm.
If you are installing through yum, then run this command.
#yum install samba
and if you are installing through rpm then run this command.
Note-if you are installing through rpm, then it’s very important you also install it’s all dependecies.
Now you create a directory which you want to share.
Now you set it’s permission
#chmod -R 777
After that you open it’s configuration file and make some changes here.
Uncommant both lines
interfaces = lo eth1 192.168.12.2/24 192.168.13.2/24
hosts allow = 127. 192.168.
Now you copy these lines and paste them at the last of the configuration file.
; comment = Public Stuff
; path = /home/samba
; public = yes
; writable = yes
; printable = no
; write list = +staff
Now you uncommant all lines and make changes as below.
comment = this is samba
path = dir name (Complete path of your directory)
public = yes
writable = yes
printable = no
browseable = yes
valid users = user-name (All user name separates by ,”camma” )
Now you create samba user and password for user using the following command.
Now you add this user in configuration file in valid user.
After that, run these commands.
#chcon -R -t samba_share_t
#service smb restart
#chkconfig smb on
Now you are ready for login in samba and for login, run this command.
(Here Enter Your Samba Password)
#smbclient //servername or IP/ -U