2

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?

2

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. – Renier Delport Apr 16 '16 at 16:27
  • 1
    I 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. – JayEye Apr 16 '16 at 20:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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