Linux Samba Server

Samba server is an easy way to share file over linux and windows environment samba is presented by and is an Open Source - Free software suite that provides seamless file and print service to samba clients.

 Installing Samba

1.Use yum to install the samba package:

yum -y install samba

2.Ehile logged on as root,create the new directory /tutdemo with the following command:


3.Change the permission on the new directory to 770 with following command:

chmod 770/tutdemo

4.Navigate to the new directory with the following command:


Add three empty file to the directory with following command:

touch file1 file2 file3

6.Use the following command to add a new samba user(the new samba user must be an existing linux user or the command will fail)

smbpasswd -a

Creating the Samba Group

7. Perform the following steps to create a smbusers group,change ownership of the /tutdemo directory,and add a user to the smbusers group.

   [root@LinuxServer01 tutdemo]# groupadd smbusers
   [root@LinuxServer01 tutdemo]# chown : smbusers / tutdemo
   [root@LinuxServer01 tutdemo]# usermod -G smbusers don
   [root@LinuxServer01 tutdemo]#

Configuring Samba

Samba configuration is done in the file /etc/samba/smb.conf.There are two parts to /etc/samba/smb.conf

Global settings:this is where you configure the'll find things like authentication method,listening ports,interface,workgroup names,server name,log file settings,and similar parameters.

8. Now,confirm that authentication type is set to user by going to the authentication section,still in global settings.

9.Next add a section for /tutdemo,which you create can just add it to the very bottom of /etc/samba/smb.conf with the following line

comment = Linux Samba Shareing
path = / tutdemo
browsable = yesguest ok = yes
read only = no-close-quote
create mask = 0755

10.When properly configured,you should be able to connect from a computer running the windows operating system and see both the general share and the user's home directory:


Share Share on Facebook Share on Twitter Share on Google+ Share on LinkedIn Pin on Pinterest Share on Stumbleupon Share on Tumblr Share on Reddit Share on Diggit