Skip to main content

How to get Linux box ping a Windows machine via netbios/wins

Name resolution in Linux is controlled by System Databases and Name Switch Configuration file which is located in /etc/nsswitch.conf, at least for my Debian based system. Note this is only true I think with libc5 and newer with NYS support and the GNU C Library 2.x (libc.so.6). The most import section to get a Linux to ping a Windows machine is the hosts statement.
# ~: nano /etc/nsswitch.conf

# <----- several lines before this one
hosts: files dns wins

What this says is that the gethostbyname and similar functions will first check the local database (/etc/hosts). If the name cannot be found then do use dns and finally wins.

But for wins lookup to work, winbind needs to be installed. Winbind provides 3 major functions for integrating with Windows network. But we are not really using anyone of those 3 major functions but rather we need the functionality provided by /lib/libnss_wins.so library. So to get this file installed, do:

#: apt-get install winbind
And as a side note, I have to reboot the machine to get this to work. There might be some service that I need to restart but which I don't know. Related links:

For a Ubuntu box, use the following link:

http://ubuntuforums.org/showthread.php?t=88206

~ts

Comments

Popular posts from this blog

Error! Could not locate dkms.conf file install VirtualBox 4.1.8 on Ubuntu 11.10

Tried to update my Ubuntu host today and it did pickup that new version of VirtualBox is available (4.1.8). All other packages installed properly except that VirtualBox installation was complaining about missing dkms.conf file, see error message below. $: sudo /etc/init.d/vboxdrv setup * Stopping VirtualBox kernel modules [ OK ] * Uninstalling old VirtualBox DKMS kernel modules Error! Could not locate dkms.conf file. File: does not exist. [ OK ] * Trying to register the VirtualBox kernel modules using DKMS [ OK ] * Starting VirtualBox kernel modules [ OK ] Though it looks like installation was fine but I am concerned about its effects to VirtualBox functionality. To fix this, do: $: cd /var/lib/dkms/vboxhost $: sudo rm -r 4.1.4 $: sudo /etc/init.d/vboxdrv setup Of course you have to re

The following add-ins could not be started MonoDevelop.GnomePlatform

Installing MonoDevelop in OpenSUSE 12.2 from its repository was very easy. When running it for the first time though I got the message: The following add-ins could not be started: The root of the trace shows MonoDevelop.GnomePlatform,2.8 A quick search shows that MonoDevelop depends on libgnomeui . This should have been part of dependencies when installing the application but well.... Below is the screen shot of the error message. References: http://software.1713.n2.nabble.com/MonoDevelop-and-openSUSE-12-1-td7462957.html [2013/04/09] - Same issue observed in OpenSUSE 12.3 and also the same fix. [2014/11/02] - Same issue observed in OpenSUSE 13.3, mondevelop 3.0.6 and the same fix.