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
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
Try nmblookup <wins-hostname>.
Method 2
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
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0