Can/Will anyone please help with setting up Samba correctly on Ubuntu 16.04? I have been through several posts on various forums, and have installed the server, the client, a few other things that proved completely useless, followed various instructions for editing the smb.conf and still I cannot find anything that will....
Just make it go.
Of course, I want to share files between machines. But, primarily need samba to "see" the home shares on the ReadyNAS 316. Nautilus can connect. It can see the server in the workgroup. And, it can even see the other folders in the /data/ directory... But, neither the "home" folder not any of the shares in the home folder can be seen. I can use samba to connect to the ReadyNAS from any number of other machines (mainly OS X) even my ipad will connect to the server. home folder access is not a problem from any other OS...
But, Linux refuses to do this seemingly basic task.
This seems to me to be one of the things that should be just a matter of setting up the path... user... and pass... But, that has definitely proven to NOT be the case with any of the networking stratgies in Linux... so far. NFS,SMB,AFP have all been impossible for me to set up. So, yeah... I have ONE handful of hair left after all the pulling. Please help me save it.
Thank you.
Here is the solution found and cobbled together from many different posts on many different forums...
The problem was in smb.conf of course.
The main solution was to make one machine a WINS server. (Thanks @heynnema) But, the [global] section of smb.conf had many small other details which cleared the initial problem and several other niggling issues. What is provided here is a starting point for anyone fighting to get samba working.
1) navigate to /etc/hosts file and enter the IP and hostname of every system in the workgroup into the hosts file...
2) Edit smb.conf to look something similar to this:
netbios name = NAME_OF_SYSTEM
workgroup = WORKGRP_NAME ##(Same for every machine/device)
name resolve order = wins hosts bcast lmhosts
security = user
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd ## (create this file)
interfaces = xxx.yyy.zzz.www/Yy etho ##(THIS system's IP/mask 8,12 or 24 depending on the subnet mask)
bind interfaces only = yes
hostname lookups = yes
server string = %h server (Samba, Ubuntu)
os level = 99
wins support = yes ## (Only on the machine which is acting as the server)
domain master = yes ## (Only on the machine which is acting as the server)
preferred master = yes ## (Only on the machine which is acting as the server)
wins server = xxx.yyy.zzz.www ##(only on the CLIENT MACHINES.. Remark this on the WINS server)
server role = standalone server
unix password sync = yes
OK then
3) create your shares...
[share_name]
comment = "WHATEVER YOU WANT"
path = /home/USERNAME ## just as an example
writeable = yes
browseable = yes
valid users = USERNAME
4) THEN.... Create your user and enable the account on all systems
sudo smbpasswd -L -a USERNAME ## This one creates the user
sudo smbpasswd -L -e USERNAME ## this one enables the user
#
This is what I did... And, it now works for me. I hope this saves someone else all the trouble I had finding, reading, and figuring this out... It is a great starting point for putting samba to work for you.
ENJOY