Search tutorial by keyword

How to Install & Configure Samba in Linux


Communication between Linux and Windows always has been some tough part of administration but SAMBA has made it much easier to share everything from Linux to Windows. In this post we will install and configure samba on our server 

#yum install samba*

This will install everything related to Samba

Now we want to make a folder which we want to share with our Windows users.

# mkdir -p /usr/sharing

Now we have to give this folder privileges 

# chmod -R 0777 /usr/sharing

Now as the folder is created and given privileges you to create users for samba by the following process

#useradd micheal

#smbpasswd –a micheal

 #groupadd smbusers

# chown :smbusers /usr/sharing

#usermod -G smbusers micheal

Now we will configure samba as there are two parts of configuration file one is global and the other is share definitions

The path of the file is /etc/samba/smb.conf

Add these lines 


workgroup = WORKGROUP

server string = Samba Server %v

netbios name = centos

security = user

map to guest = bad user

dns proxy = no

#============================ Share Definitions ============================== 


path = /usr/sharing

browsable =yes

writable = yes

guest ok = yes

read only = no


Most of the fields are self-explanatory but the workgroup should be the group which is defined in your windows machine

Now restart the samba service

#/etc/init.d/samba restart


#/etc/init.d/smb restart

Now come on windows machine 

Click Start -> Run -> \\IP_Address_Of_Samba_Machine

You will see all the files present in folder /usr/sharing


Michael Dudli

Cloud Specialist with more than 10 years experience in the Hosting Business.