Install and configure samba on Ubuntu 15.10

If you had tried to install and failed, let’s first remove the failed settings and reinstall Samba:

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

We’ll now create a brand new Samba configuration:
cp -pf /etc/samba/smb.conf /etc/samba/smb.conf.bak
sudo su
cat /dev/null > /etc/samba/smb.conf
sudo gedit /etc/samba/smb.conf

And add the following to the file:

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

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

path = /samba/anonymous
browsable =yes
writable = yes
guest ok = yes
read only = no
force user = nobody

Create a anonymous share, set permissions and restart samba daemon:

mkdir -p /samba/anonymous
chmod -R 0755 /samba/anonymous/
chown -R nobody:nogroup /samba/anonymous/
service smbd restart

Adding a removable drive, mounted at /media/joel/Ultra 2TB:
Add the following to smb.conf:

	path = /media/joel/Ultra 2TB/tv
	writeable = yes
;	browseable = yes
	guest ok = yes
	force user = joel

joel is the actual username. Restart smbd.

In case the network is not visible, install the following:
sudo apt install smbclient

and check the status by running smbtree. It may report invalid entries:

Unknown parameter encountered: "password level"
Ignoring unknown parameter "password level"
Unknown parameter encountered: "update encrypted"
Ignoring unknown parameter "update encrypted"

Fix those errors and restart the following:

sudo service nmbd restart
sudo service smbd restart

You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.