[Samba] how to check IP addresses of machines in the network?

Tomasz Chmielewski mangoo at interia.pl
Tue Jan 18 19:59:33 GMT 2005

Nick Soracco wrote:
> Tomek, 
> So you know the netbios name of the machine you want to access, but not
> it's IP address.  My suggestion would be to modify the
> /etc/nsswitch.conf file on whichever machine you need to VNC from.
> Find the line containing "hosts: files,dns" (or something to that
> effect) and appends "wins" to that list, eg: "hosts: files,dns,wins"
> Now your machine should resolve netbios names as well as IP addresses,
> so you could type: 'vncviewer SERWER:0' and be on your way.

this might work, but again, not in my case.

1) this network is separated from the others, that means that people 
that will VNC to these hosts don't use the same WINS/DNS - that's one 
problem (they can reach by IP only),

2) people that will VNC are rather windows technicians, helping with 
software etc. So they should enter a page: https://PDC/hosts - and then 
see list of hosts with corresponding IPs - after seeing that, they 
should know where to VNC.

So I guess I will stick with my WINS idea of parsing wins.dat file.

But smbclient -L --show-ips pdc > /var/www/html/hosts run from a cronjob 
would be so much easier - I will probably spend an hour to figure out 
how to parse wins.dat file to remove unnecessary stuff.
Well, one hour is about what I spent writing on this topic to the list 
anyway :))

> There's also the nmblookup tool, which might be easier to use if you
> don't have root access to modify nsswitch.conf.  

> p.s.: first post to this list, hope I followed the correct etiquette. 

you should quote below the post / appropriate sentences etc. :)


More information about the samba mailing list