How to install and configure samba on ubuntu 16.04 LTS?
Install:
sudo apt-get install samba
Add user for samba
sudo smbpasswd -a sonik
Make a directory to share:
mkdir /home/sonik/sarg
mkdir /home/sonik/public
Edit the config file:
pico /etc/samba/smb.conf
Add at the bottom of the file the new directory that we created:
[sarg]
# This share allows only authenticated users
path = /home/sonik/sarg
available = yes
valid users = sonik
read only = no
browseable = yes
public = yes
writable = yes
[guest]
# This share allows anonymous (guest) access
# without authentication!
path = /home/sonik/public
read only = no
guest ok = yes
Restart samba:
sudo /etc/init.d/samba restart
Restart samba ubuntu 18.04
sudo systemctl restart smbd
Test samba config:
sudo testparm
How to check samba version?
smbstatus