Linux Networking
--
Questions
--
Followers
Top Experts
I have a windows 2000 pc and a Linux pc (knoppix) running Samba.
I determined (via sniffer) that the Win2k pc finds my Linux pc by machine name, by sending a NBNS broadcast query (after getting no results from a DNS query).
However the Linux pc only does a DNS query, not a NBNS query, so it can't find the windows pc.
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
[global]
wins support = yes
name resolve order = wins lmhosts hosts bcast
harbor235 ;}
But there was no change... my sniffer (ethereal) showed that when pinging my win2k box, only a DNS query was sent, not an NBNS query.
Try:
nmblookup <netbios_name>
Steve :)






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
jar3817: I made the change to the file, but still no NBNS query when pinging. Do I have to restart a service for that to take effect?
sda100: that function successfully returned the IP of my win2k box (which is useful, thanks!) however how do I enable NBNS queries when pinging?
With help from another source... you need to edit /etc/nsswitch.conf
Add the wins parameter to the "hosts:" line, for example:
hosts: files dns wins
Then you should just be able to ping by netbios host name.
Steve :)

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
Still no NBNS query when pinging (only DNS). Do I have to restart a service for that to take effect? I'm on Debian (knoppix)
For the Windows machine, does it have a firewall (if so, turn off for testing)
On the Windows machine, does the output of this command match the name you're trying to ping?
nbtstat -n | find "<00> U"
(there's 2 spaces before the U)
Steve :)
But really it shouldn't make a difference if the name is correct or not. Because I determined with the sniffer that when I ping from Debian knoppix, it only attempts a DNS query, whereas pinging from windows attempts a DNS then a NBNS query.
So I just want to enable the Debian knoppix box to also perform an NBNS query, which won't matter whether the target name exists or not.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
/etc/init.d/networking restart
Failing that, can you post the [global] section of your smb.conf?
This might not be the answer you're looking for, but why don't you just set up a dns server? You can do it on the linux machine. Netbios is an old dead protocol. Starting with windows 2000 they switched the default name resolution from netbios to dns. As long as you have the right dns suffix set in all the computers you'll be able to do \\computername\share and have it work.
My [global] smb.conf section follows:
[global]
panic action = /usr/share/samba/panic-act
printing = cups
printcap name = cups
load printers = yes
guest account = nobody
invalid users = root
security = user
workgroup = WORKGROUP
server string = %h server (Samba %v)
syslog only = no
syslog = 0;
socket options = IPTOS_LOWDELAY TCP_NODELAY SO_SNDBUF=4096 SO_RCVBUF=4096
encrypt passwords = true
passdb backend = smbpasswd guest
wins support = no
include = /etc/samba/dhcp.conf
name resolve order = lmhosts host wins bcast
dns proxy = no
preserve case = yes
short preserve case = yes
unix password sync = false
passwd program = /usr/bin/passwd %u
max log size = 1000
obey pam restrictions = yes
unix charset = iso-8859-15
display charset = iso-8859-15
dos charset = 850

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
Also I think you deserve the points for this question since your suggestion on /etc/nsswitch.conf seems to be the solution... although I haven't gotten it to work, but it may be an OS issue having to do with Linux/Knoppix.
You're right and wrong about the DNS only being useful for static hosts. In it's simplest form, yes that is true. But if you want to get more complicated you could set up dynamic dns that would change as your hosts get addresses from the dhcp server. That sounds like overkill for you though...
Looking at your [global] section of smb.conf above, you don't have a netbios name specified. Add a line like this to the [global] section of that file:
netbios name = svrname
Then restart smbd and nmbd. Maybe that'll fix it.
Linux Networking
--
Questions
--
Followers
Top Experts
The variety of Linux distributions creates myriad issues relating to configuration and operations when computers are networked, not the least of which is the use of various network management applications, some of which are included with specific distributions, while others are standalone applications.