Solved

Ping Windows NetBIOS names from CentOS

Posted on 2014-04-09
7
2,503 Views
Last Modified: 2014-05-01
I am unable to resolve windows NetBIOS names from inside CentOS.  I've tried the following:

Adding "wins" entry to "hosts:" in nsswitch.conf ("files wins dns")
Changing the order of "files", "wins", and "dns" in nsswitch.conf
Restarting networking "service network restart"
Adding "search WORKGROUP" to resolv.conf (replacing WORKGROUP with my particular workgroup)
Installing samba-common
Restarting the machine

I'm kinda out of options, and I'm not sure where to go from here.  From what I've read, adding wins to nsswitch.conf should solve it, but that doesn't work for me.

I'm able to ping the computers via IP address, and I can resolve the NetBIOS names on Windows machines.  I don't think it's a firewall issues, because when I stop iptables, the issue persists.  It could maybe be an SELinux issue, but I don't really know where to start troubleshooting that.

Help me, EE, you're my only hope!
0
Comment
Question by:nick2253
7 Comments
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 39990074
As far as I know Samba is the only thing that even looks at NetBIOS on a Linux machine.  It is also the only thing that knows about 'workgroups'.
0
 
LVL 61

Expert Comment

by:gheist
ID: 39990245
WINS is not NetBIOS
You need more than samba-common to get netbios names. At least package containing nmbd is needed.
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 39990404
I think that 'ping' does a DNS lookup when you give it a host name.  There is no reason to think that the NetBIOS names are in DNS unless you did something to put them there.  On my Ubuntu systems, I had to add all of my Windows machines that have web servers to my 'hosts' file to connect to them by name.
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 27

Accepted Solution

by:
serialband earned 500 total points
ID: 39990725
There are some instructions on how to set samba up to resolve Wins.  Maybe the following links can help.  https://www.ibm.com/developerworks/library/l-lpic3-314-2/
http://forums.opensuse.org/showthread.php/454546-nmblookup-resolves-but-cannot-ping-netbios-names-or-ping-FQDN

Those eventually link to the Samba Docs which suggests that you must also edit smb.conf to configure SAMBA to point to the WINS server
Edit these lines in smb.conf
wins support = No
wins server = xxx.xxx.xxx.xxx


Scroll down to the WINS Lookup section in https://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/integrate-ms-networks.html#id2586120

You need nmbd to run nmblookup to look up names, but that's independent from ping. http://linuxcommand.org/man_pages/nmblookup1.html
0
 
LVL 61

Expert Comment

by:gheist
ID: 39990806
setting "wins" in nsswitch.conf implies querying nmbd (which can be configured with or without WINS server)
Name itself causes confusion, no wins server is needed to support pinging netbios names.

Why dont you enable DNS auto-registration in your DNS server and rise above archaic useless naming protocols?
0
 
LVL 13

Expert Comment

by:Sandy
ID: 39990860
Yes enable DNS auto-reg in your DNS server.

TY/SA
0
 
LVL 9

Author Closing Comment

by:nick2253
ID: 40035148
This didn't actually resolve my issue of getting "ping" to work with NetBIOS names (though it did allow me to get names through nmblookup), but I've since changed my DNS structure in my network, so it's no longer an issue.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Resolve DNS query failed errors for Exchange
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now