2013-12-08

installing SAMBA server in centOS Linux


Pranaam to all Bhai ji _/\_
Today we will discuss about installation of SAMBA server(SMB protocol -> small message block protocol)
samba server play important role when we want to share directories/printer between linux server and windows client machine .
SAMBA server is required when we have windows client machine in our network so that we can directories / printers from linux to windows system.
lets start ;)

Installation:-
for samba server  we need following packages
1.samba package (samba)
2.portmap (rpcbind)
3.xinetd   (xinetd)

install samba package by running this command
yum install samba



install portmap package by running command
yum install rpcbind



if you have rpcbind already installed , its ok else confirm for installation by typing y and press enter

install xinetd
yum install xinetd





okkkkkkkkk, we have done with installation of required package for samba server
restart rpcbind and xinetd service, run command
service rpcbind restart && service xinetd restart



now configure samba server share by editing samba server configuration file
samba server configuration file is  /etc/samba/smb.conf



specify your workgroup name , because it is required for accessing share for windows client
we can also define ip range , which will be allowed to access share
and one more thing , we can specify access(allowed IP) of share for individual share too :)


for specifying shared folder name, assigning user, user rights on that share and allowed IPs , we need to add following things in the last of file /etc/samba/smb.conf


i am defining a share whose name is 'sh'
and this share has following things
sharing folder  /ica (pth = /ica)
this share is not public (public = no)
share is writable for user (writable = yes)
....
...
this share is available just for user having name 'ica' (valid users = ica)
user ica  can access this share only from IP 192.168.0.211 (hosts allow = 192.168.0.211)
we can define more the one user for the share , just add usernames in line 'valid users'
like
valid users = user1  user2 user3 user4

ok now we need to add the user to samba server so that samba server let user to access share
to add a user , run command  sambpasswd -a username
i am adding user ica to samba server


we need to supply a password for user when we are adding user to samba server , this password will be asked when we will access samba share
now restart samba server by running command
service smb restart

for accessing samba share , run command
sambclient   //server_ip/share_path   -U  username 
in my case server ip is 192.168.0.211 , share path is /ica  and user who want to access share is 'ica'
so command (in my case)
smbclient   //192.168.0.211/ica  -U  ica
samba server will ask  password for user , supply password that you set in command "smbpasswd -a username"
and you will be able to access share


yes ^_^
this was about samba server installation and configuration
Thank you
Greetz to :- Guru ji Zero , code breaker ica, Aasim shaikh,Reborn, Raman kumar rana,INX_r0ot,Darkwolf indishell, Chinmay Pandya ,Silent poison India,Magnum sniper,Atul Dwivedi,ethicalnoob Indishell,Local root indishell,Irfninja indishell,Hardeep bhai,Mannu,Viki and AR AR bhai ji <3
Share this post

0 comments

:) :-) :)) =)) :( :-( :(( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ :-$ (b) (f) x-) (k) (h) (c) cheer

© 2009 Start With Linux | Mannu Linux
Designed by cyb3r.gladiat0r
Posts RSSComments RSS
Back to top