15

I have a list of hosts in the network providing shares via SAMBA. How can I determine either IP address or the host name of one particular host, e.g. the one with the name “SASAK02”.

The output of smbtree is as follows

WORKGROUP
    \\SASAK02               
    \\SAURA-PC1             
    \\PC-VAN-DAMME          
Kevin
  • 40,087
  • 16
  • 88
  • 112
Marco
  • 33,188
  • 10
  • 112
  • 146

2 Answers2

37

Try nmblookup <wins-hostname>.

Mika Fischer
  • 2,212
  • 1
  • 16
  • 16
1

You can install wireshark and start a scan on your network card.

sudo apt-get install wireshark
gksu wireshark

start monitoring your network-device (usually eth0, wlp1s0 or wlan0), filter the result by "nbns" and you will see the IP in the upper window.

If it doesn't show up, go to your filemanager in the network tab where you see the share and actualize the sceen (usually F5)

A simpler solution is nmblookup (part of samba-common-bin) but it doesn't find all shares, for example:

nmblookup saura-pc1
rubo77
  • 27,777
  • 43
  • 130
  • 199