Samba is a program for Linux based system that is used to bridge with the various operating system platforms like Windows, Linux, MAC OS, UNIX, AIX, etc. It is an application works on the basis of Service Message Block protocol. It works with many operating systems which uses SMB client / server network protocol. It allows the server communicate with client machines on a single or multiple network. this tutorial Explains about How to Install & Configure Samba on Ubuntu based distribution. You need to follow all the steps for assured samba setup.
Step 1: Please update your server with commands from your shell
$ sudo apt-get update
Step 2: Install the Samba packages
$ apt-get install samba -y
Configuring On Samba Server
Step 1: Create a folder to be shared with the client computer.
As an example I will create a folder myfolder in the home folder.
$ sudo mkdir /home/myfolder
Step 2: Change folder permission to 777.
$ sudo chmod 777 /home/myfolder
Step 3: Configuring file smb.conf in /etc/samba/.
$ sudo nano /etc/samba/smb.conf
Then add the script below :
[data_server] path = /home/myfolder/ browseable = yes read only = no guest ok = yes writeable = yes
Step 4: Restart samba service.
$ sudo systemctl restart smb $ sudo systemctl restart smbd
Configuring On Samba Client
On the client side, if we want to add a folder on the share, we need to do the following:
Step-1: Create a folder to put the folder will be shared myclientfolder.
$ sudo mkdir /mnt/myclientfolder
Step 2: Then mounting another computer folder to your computer.
$ sudo mount -t cifs //ip-address-server-samba/myfolder /mnt/myclientfolder -o password=
Step 3: To disconnect the folder that had been mounted, please type the command:
$ sudo umount /mnt/myclientfolder
That’s all for now.