I have a few Pis (Raspbian), a few Windows one other Linux PC on my LAN at home. They operate under two different workgroups set by the Windows computers. I'm playing around with the settings of Samba on my Pis. Let's say I didn't know, is there a terminal command or Bash script I can use to see what (just the names) workgroups are available on my network?
1 Answer
This is not a pi-specific question.
The easiest way is to use nbtscan:
nbtscan -v -h 192.0.2.0/24
Or just search for "samba find all netgroups" on Google!
-
Thank you. Was hoping for a cleaner and more specific solution, but it does give the required information. Apr 16, 2016 at 16:27
-
1I aimed for the least-effort and least-amount-of-understanding-necessary solution :) After you've played around with nbtscan and smbclient, you may want to look into the python-samba (or ruby-samba or whatever your choice of poison is :) ) libraries and do exactly what you need.– JayEyeApr 16, 2016 at 20:46