ping win7machine
This post [1] has a nice and short explanation of how to get it done:
1. edit /etc/nsswitch.conf
2. find the line starting with “hosts”
3. append “wins” to that line
4. reboot and wait (name resolution takes some time)
On my machine the line looks like this:
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 wins
A post comment said that the package winbind needed to be installed, for me it worked without that.
Update 2011.10.14 With Ubuntu 11.10 I also needed winbind
sudo apt-get install winbind
Update 2014.12.15 And with 14.04 you also need to install libnss-winbind:
sudo apt-get install libnss-winbind
Resources
[1] ping netbios names from linux (samba)
http://www.linuxquestions.org/questions/linux-networking-3/ping-netbios-names-from-linux-samba-271336/
[2] Windows hostnames are not resolved
http://askubuntu.com/questions/93302/windows-hostnames-are-not-resolved
This comment has been removed by a blog administrator.
LikeLike
Update: a new library is needed in ubuntu 14.04
LikeLike