Create a Public Samba Share on Ubuntu 17.04 | 17.10

This brief tutorial shows students and new users how to create a public Samba shares on Ubuntu server so everyone can access without authenticating. This share will be fully accessible to all and everyone will be able create, modify and delete folders and files.

Then in our next post we’ll show you how to create restricted shares so only authenticated users can access.

For those who don’t know, Samba is a opensource implementation of Microsoft SMB/CIFS protocol. It provides fast and secure files and print services for clients using the SMB/CIFS protocol. Simply put, it provides files and printer sharing between clients and servers.

To get started with creating a public share that can be fully accessed by everyone, continue with the steps below:

Step 1: Install Samba

The first thing you’ll need to do is install Samba. To install it run the commands below.

sudo apt-get update
sudo apt-get install samba

The commands above install Samba and all other dependencies.

Step 2: Create the Share

First, create the folder you  want to share with the public. The folder can be anywhere but set its permission so that everyone can access it. For this this tutorial, our share will be /home/Public

Run the commands below to create the folder you wish to share.

sudo mkdir /home/Public

Then set the share permission so everyone has full access to it.

sudo chmod 0777 /home/Public
sudo chown -R nobody:nogroup /home/Public

Step 3: Configure Samba

Now that Samba is installed, you must now configure it to provide file and print services to clients. This can be done by editing its default configurations file. First create a backup of the configuration file by running the commands below.

sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.bak

Next, run the commands below to open/create a new configuration file.

sudo nano /etc/samba/smb.conf

Then add the content below into the file and save. Our share will be called Public as defined in the setting below  [Public]

workgroup = WORKGROUP
server string = Samba Server %v
netbios name = ubuntu
security = user
map to guest = bad user
name resolve order = bcast host
dns proxy = no
bind interfaces only = yes

# add to the end
   path = /home/Public
   writable = yes
   guest ok = yes
   guest only = yes
   read only = no
   create mode = 0777
   directory mode = 0777
   force user = nobody

Save the file and exit

Step 4: Restart Samba

After configuring the setting above, restart Samba by running the commands below.

sudo systemctl restart smbd

Step 5: Access the Share

Now log on to your other computers and access or map the share using the Ubuntu machine name or IP address.

ubuntu samba share windows

You cam map the location if you’d like

ubuntu samba map


ubuntu samba map share

You may also like the post below:


  1. i have do the same steps but when i try to access to my folder windows prompt windows cant obtain access

  2. I want to make a webpage for the clients (on samba server) which they can open and will print their username and ip address. What I want is to know how I can I implement file server and web server together? How can I implement it? I am tremendously confused after a full day of googling. My ultimate aim is to run python scripts for various functioning in home automation. My main confusion is how the web server and file server communicate ?

  3. I want to help you even though your your post is from the 3rd Century “12/01/201.” and computers supposedly didn’t exist back then.
    You also need to change the share folder’s permissions via your file explorer (mine = nautilus).

    Under permissions > group > sambashare
    Select: Create and delete files

    This was the solution for me after trying everything without success in my smb.conf file.

  4. And it doesn’t work, just like the 10 million other how-to guides on the internet. Linux devs really have to get their stuff together.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.