Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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          
share|improve this question

2 Answers 2

up vote 9 down vote accepted

Try nmblookup <wins-hostname>.

share|improve this answer

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 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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.