Ubuntu Tutorial – Create Samba Share with public access

January 12, 2016 | By | Reply More

Hi, its been a while not writing on this blog. I have some offline works to do. OK, here I want to share a simple guide for Ubuntu users to create a simple Samba server which can be accessed by anyone on the network. Its a public accessed samba share with no password. Please note that this is insecure to share a samba folder without password, so make sure you are not sharing important data with passwordless access.

First, we need to install Samba on Ubuntu. I am using Ubuntu 15.04. Other Ubuntu version should be the same as described here.

Install Samba

apt-get install -y samba samba-common python-glade2 system-config-samba

Configure samba

First backup smb.conf in case we mess things up.

sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.backup

Next, type the following lines to smb.conf. You can use nano to edit the file.

sudo nano /etc/samba/smb.conf

Add these lines to it

[global]
workgroup = GAMBLISFX
server string = Samba Server %v
netbios name = ubuntu
security = user
map to guest = bad user
dns proxy = no

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

[Public_Share]
path = /samba/public
browsable =yes
writable = yes
guest ok = yes
read only = no
force user = nobody

Now close and save the file. Next we need to create the directory

sudo mkdir -p /samba/public

Set the permission

chmod -R 0755 /samba/public/
chown -R nobody:nogroupĀ /samba/public/

Now restart samba

sudo service smbd restart

Done. Now you can access the Public share we just created from other computer such as Windows. From Windows, open Windows explorer and type the server IP with the following format

\\192.168.8.1

You should see the Public shared folder there.

samba share ubuntu

Thank you for reading this tutorial.

Tags: , , , ,

Category: Ubuntu

Leave a Reply