-
Install Samba
sudo apt-get update sudo apt-get install samba
-
Set a password for your user in Samba
sudo smbpasswd -a <user_name>
Note: Samba uses a separate set of passwords than the standard Linux system accounts (stored in /etc/samba/smbpasswd). Having said that, I always use here whatever username I use for my Linux account. -
Create a directory to be shared
mkdir /home/<user_name>/<folder_name>
-
Edit the file "/etc/samba/smb.conf"
sudo vim /etc/samba/smb.conf
And add the following:[global] workgroup = HOME_NETWORK #(Set this to the name you want the shared folder to have) [share] comment = File server share folder path = /home/<user_name>/share/ browsable = yes read only = no guest ok = yes writable = yes valid users = <samba_user_name> create mask = 0755
-
If you setup a firewall, allow port 445
ufw allow 445
-
Restart the samba:
sudo service smbd restart
-
Once Samba has restarted, use this command to check your smb.conf for any syntax errors
testparm

Friday, December 23, 2016
How to Install and Configure Samba in Ubuntu 16.04
Subscribe to:
Posts (Atom)