SAMBA Server Configuration


SAMBA(SMB server) is a file sharing server. Which is used to share files between Windows, Linux and Unix Systems. SMB(Server Message Block) is a proprietary protocol which is developed by Microsoft

Lets see how we can configure SAMBA in Linux.

Step1 : Create a directory where you want to keep data and share with other remote systems(either windows/Solaris/in fact any unix flavor etc).
#mkdir /share1

Step2 : Installing Samba server
#yum install samba

Step3 : Once we install Samba server, configure it using its main configuration file(/etc/samba/smb.conf)

Step3(a) : Open smb.conf file and specify the work group where this server belongs

#vi /etc/samba/smb.conf
search for workgroup word and specify your work group name
workgroup = windows-group.

Why we require this workgroup?
Ans : When windows user try to access any network resource they first try to access my network places and then search for workgroup then to server. So definitly we have to specify this workgroup entry in smb.conf file.

Step3(b) : So now we have to give a name to this samba server, search for "server string" with out quotes then provide the samba server name(here that name is linux-share)

server string = linux-share

Step3(c):Now specify the share details, which folder you want to share. To whom you want to share? Goto last line of the smb.conf file specify your shared folder details as follows.
[myshare]

comment = "This is my Linux data want to share with my windows users"
path = /share1
valid users = user1 user2
writable = no
privatable = no
browsable =yes.

After giving this seven entries just save and exit the file.

Let me explain each and every thing what we used here.
a.[myshare] --This is my share name, so when ever any user accessed my samba server through network this will be visible as folder shared.
b.comment -- This is just a comment, which will help to know what is this share for.
c.path -- This is used to specify which folder on my samba machine to share.
d.valid users --This will specifies which user is having access on this folder.
e.writable --This will specify whether users are able to write or not, In this example the can just read the folder and copy.
f.Privatable --This will indicate whether this folder is private or not.
g.browsable -- This is used to specify whether the folder content is browsable or not.

Step4 : Now create passwords for the users who are going to access this samba share remotely.

#smbpasswd -a user1
#smbpasswd -a user2

Please specify the passwords for this 2 users and this passwords will be stored in /etc/samba/smbpasswd

Step5 : check for the syntax for your smb.conf file if in case you did any mistake

#testparm

Step6 : Restart the samba service

#service smb restart

Step7 : Permanently on the smb service, So that after rebooting the system too our server will start running.

#chkconfig smb on

Please check my other post how to mount or see the SAMBA shares
here

Please comment your thoughts regarding this post:-)

  • Like the post? Please Subscribe to free RSS feed to get updates
  • Related Posts by Categories



    0 comments:

    Archive

    Translate this page

     

    The Linux Juggernaut | Copyright 2006-2009 Surendra Kumar Anne | Surendra's Home Page | Give us feedback how we are doing, Click here