Your last post tells me that the issue here isn't one of technical correctness but one of intended audience.
In a home lan environment the following HowTo or other's just like it will fix this issue for Samba 98.68 % of the time - I measured it

. The only time it hasn't is when the OP didn't tell anyone that he had multiple subnets in his network :
Samba Browsing Problems Checklist:
viewtopic.php?f=42&t=88146&start=0One of the items is changing the default mechanism that Samba uses to map addresses to netbios names which is this:
- Code: Select all
name resolve order = lmhosts wins host bcast
In Linux "lmhosts" doesn't exist by default and "host" isn't set up for Samba by default so they are ignored. "wins" refers to a WINS server that also doesn't exist on a home lan by default so it should be ignored. That leaves "bcast" (
This corresponds to a Windows' "Netbios Node Type = B-Node" or "broadcast") as the only mechanism that works by default and it's listed after "wins".
When a user tries to browse the network for samba shares and gets the infamous "Failed to retrieve share list from server " error it's usually because of "wins". Doing an
smbtree command will usually show that it resolved a netbios name to the address 0.0.0.0 which means samba eventually gave up or it shows an ip address that corresponds to the users ISP's DNS server meaning that samba has actually left the lan and is trying to find a WINS server on the internet itself. Rearranging the name resolve order by putting bcast first or at least before wins usually resolves the issue. At that point if I really need to find out which ip address corresponds to what netbios name I can use nbtscan like this:
- Code: Select all
nbtscan 192.168.0.1/24
But in a corporate environment I suspect you'd want to do just the opposite. If you have 200 seats you don't want to have them all broadcasting their presence on the lan because it would slow everything down. In a home network if one does not want to go the "bcast" route one could go through contortions like setting up a lan side dns server - using dnsmasq perhaps(?) - or one can simply use mDNS ( avahi - zerconf - bonjour ) which provides a lan side DNS server mechanism. As you have pointed out however it is not something that one would do in a corporate network since it also is broadcasting their presence and although far less demanding that nmbd on the Samba side is still a hit to network performance on a large scale.
I do not believe that winbind and the nsswitch change has any place in a home network. The wan browsing delay issue as well as other issues that can arise are not bugs but a direct result of winbind / nsswitch doing exactly what it's intended to do when used outside of a corporate environment. Your inability to map ip addresses to host names appears to be a result of your corporate network not having a lan side dns server or perhaps one that is not configured correctly. Don't ask me how to do any of that because quite honestly that is above my pay grade.
Side Note: There are 2 Ubuntu bug reports - both of which are confirmed - and both of which I cannot find at the moment that addresses 2 problems with the default set up in Ubuntu / Mint:
** One is basically a request for the Ubuntu installer to prevent a user from creating a host name longer than 15 characters.
** The other is to automatically change the default name resolution order to have bcast first.
I predict that when / if these 2 bugs are are fixed the winbind issue - at least for the home user - will never come up.