Windows/Linux host name integration
Windows machines communicate over the NetBIOS and SMB protocols, and use NetBIOS to resolve each others' names. On UNIXoid systems like GNU/Linux, names are usually only resolved via DNS and /etc/hosts (Windows supports both of there techniques as well, though /etc/hosts is someplace else). This means that if you have a bunch of Windows machines and a linux machine, the windows machines will be able to call each other by name (can be tested with the PING command in a DOS prompt), but cannot be resolved from the linux machine. If you are in a windows network, you usually install Samba sooner or later, which allows you to share files with the windows machines and allows the windows machines to ping you by name, NOT the other way round. This is, puzzlingly, the default setup on all distributions I've seen.
To fix this, make sure you have a file
/lib/libnss_wins.so.2 or similar. On Debian GNU/Linux 3.1, this is located in the
winbind package, but it could be part of samba in other distributions. Then, open
/etc/nsswitch.cond in a text editor you are capable of using as root and look for a line like
hosts: files dns
wins to it:
hosts: files dns wins
VoilÃ , you should now be able to
ping a windows machine by host name or use the name in any program really.