Server 1: 10.0.0.10
smb.conf:
[global]
workgroup = WORKGROUP
Server string = %h server (Samba, Ubuntu)
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
server role = standalone server
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
map to guest = bad user
usershare allow guests = yes
[public]
comment = Public share
path = /mnt/public
browsable = yes
read only = no
guest ok = yes
force user = nobody
create mask = 0777
directory mask = 0777
[apps]
path = /mnt/torrents/apps
writable = yes
browseable = yes
public = yes
create mask = 0644
directory mask = 0755
force user = shareuser
This works as expected. From a windows 7 client, I can access the share(s) with \10.0.0.10\public
Server 2: 10.0.0.4
smb.conf:
[global]
workgroup = WORKGROUP
Server string = %h server (Samba, Raspbian)
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
server role = standalone server
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
map to guest = bad user
usershare allow guests = yes
[public]
comment = Public share
path = /mnt/public
browsable = yes
read only = no
guest ok = yes
force user = nobody
create mask = 0777
directory mask = 0777
On this server, the share is not accessible from the same Windows client. \10.0.0.4\public results in
"Windows cannot access \10.0.0.4\public ... Error code: 0x80070035 The network path was not found.
My question: How on earth is this even remotely possible? The Samba shares are 100% identical, and both servers are connected to the same switch/router, and otherwise identically accessible from the entire LAN. SSH and FTP, for instance, works fine for the 10.0.0.4. But for some incomprehensible reason, Windows cannot access it. There are absolutely no firewalls on any of the servers, and they are as vanilla as they can get.
I've been banging my head against Samba before, and I sort of hate it with a vengeance. But some things are even more stupid and incomprehensible than others, and this looks like one of those.
As stated in a comment by @DanielJ, you can check if it's a file or folder, for example, by running cd /mnt/public/
and seeing if you land in a directory or not.
Next, check the file permissions, by running ls -lah /mnt/
. If you can post that output, we can determine if Samba would be able to work that that folder or not. (Edit your question to show the output)
Weirdly, do you have a user named public
? Check in your tdbsam
(execute pdbedit -L public
) and /etc/passwd
file (execute grep public /etc/passwd
). If the user exists, it may attempt to find a home folder for that user before checking the other share defintitions.
Also, when working with Samba, get used to running testparm
and testparm -s
. The first checks the syntax of all the commands and share definitions, while the latter shows that and dumps the current configuration that it's using.
User contributions licensed under CC BY-SA 3.0