SAMBA share via hostname not working in Windows 10

MrGlasspoole

New Member
Jan 17, 2020
11
1
3
Hi,

i have the problem that on my workstation i don't see the shares if i use the hostname of one machine.
There are two other Windows machines (same release and setting) and there it works.

I have SAMBA shares in two Debian installation.
\\3-CPO on my workstation does not show the shares but it works on two other PCs.
\\BOB does work on my workstation.

I found this:
Unable to connect to samba via hostname from Windows 10

So i tried \\3-CPO.local and then the shares show up.
Why does BOB work without .local and 3-CPO not?
Any idea how i can figure out what the problem is?

I often read you need DNS.
But i never made an DNS entry for any machine in pfSense and they always where found by the hostname?
 

azev

Active Member
Jan 18, 2013
745
219
43
are both system on the same network/subnet ?? if so then it should work via broadcast.
If they are on a different network/subnet you need either dns or wins for hostname resolution.
 

MrGlasspoole

New Member
Jan 17, 2020
11
1
3
Yes they are.

But i also tried it with a entry in the DNS resolver and 3-CPO does not work.

EDIT #1:
Just found out that just a dot is enough?
So "\\3-CPO." also works.

EDIT #2:
It works now and i don't know what the problem really was.
I have the machines in quick access:
smb.jpg
1. \\3-CPO. did show all the shares.
2. From there i went into \\3-CPO.\Media
3. Then in the address bar i did remove the dot \\3-CPO\Media and that worked
4. I then removed Media so only \\3-CPO was left and the shares did show
5. Clicked on 3-CPO in quick access and the shares did disappear again.
6. So i removed it from quick access
7. FUNNY: \\3-CPO did work
8. Did pin it to quick access again and is now working...

After hours searching Google what it can be...
 
Last edited:

Patriot

Moderator
Apr 18, 2011
1,319
701
113
super strange, but um, if you use NFS you will get better performance, just have to install it.
upload_2020-1-17_21-59-36.png
 

acquacow

Well-Known Member
Feb 15, 2017
605
322
63
39
Make sure your home network is set to "private":

upload_2020-1-18_23-57-0.png


And that you have network discovery and file and printer sharing enabled for your private network:

upload_2020-1-18_23-56-36.png
 

Lost-Benji

Member
Jan 21, 2013
424
23
18
The arse end of the planet
SMB 1.0 on if you have mixed gender OS's around the network.

Whats been missed above? Master Browser
Windows 10 has it off in some cases but in many, its on. You need to set a machine that stays on as the Master Browser (Services > Master Browser - Turn it on to Auto) and visit all other machines and disable it. Winblows turns it on by default and you will find machines on the network fighting like little bitches as to who is going to be the boss.

The other thing to do is get your DNS under control. Open CMD, do a TRACERT to the net name of the machines in question, if it doesn't come back with the correct resolved IP of the serverin question, there be the problem. Flush the DNS and get it cleaned up.
 

bmorepanic

New Member
Oct 24, 2020
13
1
3
Baltimore, Hon
If you're a small site, it sounds overwhelming to run your own dns, but it's not too bad once you learn the terms.

Windows stuff finds other windows stuff by asking around and listening to broadcasts. Some systems use netbios, some use ws-discovery and some pick it out of their own cache. DNS replaces that mess with a known place to resolve names. When you run a local dns server, it contains a list of all of your servers and workstations. When someone asks for something on the internet (google for instance) it will ask a bigger dns server to find it transparently.

The other way of doing this that is stable is to use the hosts file. If you have less than, say, 10 things that need name resolution, this will give you enough time to study up on dns. Hosts lives in Windows\System32\drivers\etc\hosts. It has a list of ip addresses and names. It is local name resolution, not available to anyone else. This does names resolution for me on my computer but not for anyone else.

Hosts is the very first thing that windows tries to resolve any name to an ip address. If it finds an entry in hosts, it uses it. No hosts, it can do a variety of things (which others have covered), then it tries DNS.

10.1.10.1 Firewall
10.1.10.5 Grandview
10.1.10.6 Bro2070N
10.1.10.10 milk-crate
10.1.10.20 Ryzenator
10.1.10.90 bmc

The other thing hosts OR a local dns can do is block certain names...

127.0.0.1 ad.doubleclick.net.

Make up one file and put it on all of the client pcs. Then read up on DNS and name resolution.
 

Netwerkz101

Active Member
Dec 27, 2015
299
78
28
So i tried \\3-CPO.local and then the shares show up.
Why does BOB work without .local and 3-CPO not?
Any idea how i can figure out what the problem is?
Might be the "-" in the name of "3-CPO"
without a trailing "." it may be seen as just a NETBIOS name.

At one point (old school DNS naming) .. i don't think you could start a host name with a number.
Not so today IIRC