Ubuntu Install Samba
So you want to use a linux server on local network. Great, but if you still have to access the files through ssh or ftp, it is troublesome. So why not access the files over samba network share? It is also great when you want to setup a simple NAS server on your local network.
Install
As always, first step, update server and install samba:
1 2 3 | |
Configure
Now we need to add a linux user who will hold the credentials. In this case, we'll add a user "somik" so remember to change it to what you need:
1 | |
You should see something similar to this. Enter password any details you want to. Only password is required:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | |
Once done, add the user we added above to Samba, then enter password when asked to:
1 | |
Now edit the samba config file:
1 | |
Take note of the following:
1 2 3 4 5 | |
And append this at the bottom of the file, where "DocuRoot" is the display name of the shared folder, "/var/www/html" is the folder we want to share (can be different in your case, just create it beforehand), and "www-data" is the user and group of the folder.
Setup shares
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | |
And test your samba config file with
1 | |
If no errors, start up your samba server and enable it on boot. Then just access it like any network share from your computer.
1 2 | |