Samba Server installation on Ubuntu 14, 16 and 18
Ubuntu Tips: Install Samba File Server
About This Guide
In this text, I teach how to create a network share via Samba using the CLI (Command-line interface/Linux Terminal) in an uncomplicated, simple and brief way targeting Windows users.
Start by opening a new Terminal window or login via SSH to the Ubuntu system you wish to modify. Then run the following command:
sudo apt-get install -y samba samba-common python-glade2 system-config-samba
To configure samba, edit the file /etc/samba/smb.conf. I will use nano as editor and make a backup of the original file before I start to change it. The backup file is named /etc/samba/smb.conf.bak
sudo cp -pf /etc/samba/smb.conf /etc/samba/smb.conf.bak
Open the Samba configuration file with nano:
sudo nano /etc/samba/smb.conf
Moreover, add the following lines.
#============================ Share Definitions ==============================
path = /samba/anonymous
writeable = yes
guest ok = yes
read only = no
force user = nobody
Then I’ll create a directory for the anonymous share.
sudo mkdir -p /samba/anonymous
Set the correct permissions.
sudo chmod -R 0777 /samba/anonymous/
sudo chown -R nobody:nogroup /samba/anonymous/
Moreover, restart Samba to apply the new configuration.
sudo service smbd restart