In this tutorial we will learn how to configure Samba Server with Ubuntu 16.04. Samba can enable file and printer sharing between Linux and window based OS. Samba is a reliable software and can be deploy in complex networks.  A samba server could offer various services e.g.

  1. It can act as domain controller for window network.
  2. Enable printer sharing for Linux and Windows OS.
  3. Share files and data between Linux and Window based hybrid scenario.
  4. We can share more then one distributed file systems using samba.

Configure WordPress (1)

Prerequisites  to install Samba

A server with minimum Corei3 processor with 4 GB RAM will be enough to share data in 100 System network. To enable effective data storage, it is recommended to use at least 1 TB hard disk. Install Ubuntu latest LTS version i.e. 16.04. We will create a secure share which will be strictly accessible to members of a group we will create. There will be no read or write permissions for guest users.

Install and configure Samba Server

Our demonstration scenario will be having following settings, which you can modify as per need –

Share directory  – /share/data

Samba User’s group name – sambashare

Samba user name – jt

Server IP Address –

Client OS – Windows 10

Install samba

First of all update server

Install required packages

Start Samba Service

Crete user and group for samba share

Create a new group named samba share

Create a new that will access samba share

Assign a samba share password to that newly created user ‘jt’, assign a password you desire.

Let the user ‘jt’ be a member of ‘sambashare’ group which we have created in previous step.

Now, we have a group the members of which will be able to access shared directory. We also have created a  user with samba share password which is the member of our ‘sambashare’ group. In nest step we required some  directory which will be available as shared directory to to samba users.

Create a shared directory for Samba Server

Create a directory

Change ownership for that directory

Change permissions for that shared directory

Now, we have a shared folder which is accessible to root and sambashare group members. In next step we need to configure samba configuration file.

 Edit /etc/samba/smb.conf for file sharing

Open smb.conf file

Edit settings and provide all of the credentials. Give hind about share in comment section, provide directory path, set guest ok to no, make shared directory writable and browsable, define valid user name with ‘@’ symbol. Put these new [data] share entries at the end of file, save and quit.

Now we have configures all of the required settings to enable data sharing between Linux and Window operating systems. Let us test our settings, restart samba service once.

# /etc/init.d/smbd restart

Test Samba share with window 10 OS

Open window client, type ip address of  samba server  in run and press ok.


Click to the shared directory.


It will ask for a password. Provide user which we created in previous steps and password which was assigned with ‘smbpasswd’ command.


Press ok, you should be able to access the folder now, try to create or remove some files, if things as good you should be able to to that successfully.


We are able to access our shared data, now let us add that share directory as mapped drive, click right to shared folder.Assign a letter to drive.


Click finish button and now we have a function samba based shared drive.


This is how we can share things across Ubuntu and Window operating systems.


With samba we can configure Samba PDC, shares available for anonymous users or printer sharing server. We can add multiple shared folders available to access for multiple users or groups, the samba sharing are very stable and reliable options, sometimes issue with write permissions may occur, configure your settings carefully.


  1. how to settting samba server in different segment IP.
    samba server =
    local access via laptop =,, and more..

    why samba server cannot accross subnet like that?
    please help..



Please enter your comment!
Please enter your name here