For many years, even before Windows networking exisited, resolving symbolic names to their numerical IP address is done according to settings in the "/etc/resolv.conf" file.
This file only handles settings for the Domain Namy System (DNS) and is used in the C resolver library. Programs like
ping are use this library whenever they have to resolve a symbolic name into an IP address. NETBIOS name lookups are not handled by that library at all.
A younger addition to name resolutions is the "/etc/nsswitch.conf" file. The name stands for NameServerSwitch.conf. It allows more ways to resolve names, e.g. NIS. Unfortunately for you NETBIOS is not one of them
You can do NETBIOS lookups from the command line:
Code:
$ nmblookup hercules
querying hercules on 192.168.222.255
192.168.222.20 hercules<00>
You would have to write a small script to extract the found IP address and then pass it to
ping.