Samba server configuration in linux step by step rhel 6

How to samba server configuration in linux step by step rhel 6   

SAMBA SERVER                                         

samba server configuration in linux

 

 

 

 

 

 

 

 

 

 

 

The whole point of networking is to allow computers to easily share information. Sharing 

Information with other Linux boxes, or any UNIX host, is easy-tools such as FTP and NFS

are readily available and frequently set up easily “out of the box”. Unfortunately, even the

most die-hard Linux fanatic has to admit the operating system most of the PCs in the word

are running is one of the various types of Windows. Unless you use your Linux box in a

particularly isolated environment, you will almost certainly need to exchange information

with machines running windows. Assuming you’re not planning on moving all of your files

using floppy disks, the tool you need is Samba.

 

  • Samba is an implementation of a Common Internet File System (CLFS, also known as SMB)

protocol server  that can be run on almost every variant of Unix in existence. Microsoft

clients will use this protocol to access files and printers located on your Unix

box just as if were a native Windows server.

 

  • Samba allows Linux computers to shere files and printers across a network connection. By

using its SMB protocol, your Linux box can appear in Windows Network Neighborhood or

my Network places just like any other windows machine. You can share files this way, as

well as printers. By using Samba on My home network, for example, my Windows machines

have access to printer directly hooked up to my Linux box, and my Linux box has access to a printer directly hooked up to one of my Windows machines. In addition, everyone can

access everyone else’s shared files. You can see how samba can be very useful if you have a network of both Windows as well as Linux machines.

  

Profile for SAMBA Server configuration in Linux:

 

Usage                       :               used for sharing files and directories in the network

                                                    Between different platforms, like Linux-windows

Package                   :               SAMBA, SAMBA-common, SAMBA-client.

Daemons                 :               smbd, nmbd

Script                        :               /etc/linit.d/smb,/etc/linit.d/nmb

Portno                      :               187 (net bios-ns{name service}), 138 (net bios-dgm {datagram})

                                                    139 (net bios-ssn{name service}), 445 (Microsoft-ds{dist sys})

File system             :               CIFS (common internet file sustem)

Confing file            :               /etc/samba/samba/ smb.conf

 

Step to configure SAMBA server Configuration in Linux

 

Step1: Check and Install the SAMBA package, if not installed

      #rpm –q samba

 

  • Install the package using yum

#yum install samba* -y

 

Step2: Make a directory and assign full permission to it , which will be shared

  • #mkdir /ktsamba
  • #chmod777/ktsamba

     

Step3: Check the context of the directory and change it according to samba

  • #ls-laz /ktsamba
  • #chcon –t samba_share_t/ktsamba

 

Step4: Create a user or use any existing user who will be allowed to log in as samba user, add

  that user to samba user

  • AS we have a existing user “ktuser” , let’s just make it samba user

#smbpasswd –a <username>

#smbpasswd –[a ktuser

Give password twice and wait till it add the user

 

Note: To delete a user from samba use #smbpasswd –x <user name>

  • To check all the samba user use

#pdbedit-L

 

Step5: Go to the configuration file i.e. /etc/samba/smb.conf and make the following changes

  • Open the /etc/samba/smb.conf and copy the last seven lines shown lines shown below and paste it at the last to edit it.

 

 Once pasted remove”;” mark before it and change it according to following picture

 

[ktuser]                                                 :               Share NameExplanation about the above field

  • Comment=public stuff :               Comment
  • Path= /ktsamba :               share Directory
  • Public = no :               Public Access (Every user in network)
  • Valid user = ktuser :               Authorized user
  • Writable = yes :               Write Permission
  • Printable = yes :               Print permission
  • Host allow = 192.168.10. :               Network Range or host range

Note: 192.168.190. Represent entire 192.168.190 network

 

Step5: Test the samba parameters and restart the service and make it enable after reboot

  • To test the parameters us the following command

#testparm

 

  • We have to restart two services here
  • #smb and #nmb and make it add to enable after reboot

#service smb restart

#service nmb restart

#chkonfig smb on

#chkonfig nmb on

This is the step by step samba server configuration in Linux ….

Read also:

How to configure windows as samba server client

How to configure windows as samba server client

 

Leave a Reply

Your email address will not be published. Required fields are marked *