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
exit
sudo gedit /etc/samba/smb.conf
And add the following to the file:
[global] workgroup = WORKGROUP server string = Samba Server %v netbios name = ubuntu security = user map to guest = bad user dns proxy = no #============================ Share Definitions ============================== [Anonymous] 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:
[tv] 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:
smbtree 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
Joel G Mathew, known in tech circles by the pseudonym Droidzone, is an opensource and programming enthusiast.
He is a full stack developer, whose favorite languages are currently Python and Vue.js. He is also fluent in Javascript, Flutter/Dart, Perl, PHP, SQL, C and bash shell scripting. He loves Linux, and can often be found tinkering with linux kernel code, and source code for GNU applications. He used to be an active developer on XDA forums, and his tinkered ROMS used to be very popular in the early 2000s.
His favorite pastime is grappling with GNU compilers, discovering newer Linux secrets, writing scripts, hacking roms, and programs (nothing illegal), reading, blogging. and testing out the latest gadgets.
When away from the tech world, Dr Joel G. Mathew is a practising ENT Surgeon, busy with surgeries and clinical practise.