[Samba] Enumerate computers in WG/domain

Henrik Zagerholm henke at mac.se
Fri Dec 16 08:10:20 GMT 2005

Hi Michael,
I've been looking at those to commands but unfortunately they are  
somewhat incomplete.
Instead I wrote my on little C module that uses libsmbclient. If you  
input smb://WORKGROUP to the smbc_opendir functions it will retrieve  
all computers. You can also specify how many local or master browsers  
it will query for this info. Other commands only asks the first one  
and can then miss some workgourps or computers (I can enumerate all  
workgroups by only supply smb://)   =)

Thanks anyway!


16 dec 2005 kl. 09:02 skrev Michael Gasch:

> Henrik Zagerholm wrote:
>> Hi!
>> Is there any smaba tool that will let me enumerate all computers  
>> in a  specific domain or workgroup?
>> Have been looking through the normal commands but havn't found  
>> anything.
>> Regards,
>> Henrik
> not cool, but works :)
> smbclient -L \\\\pc-in-a-workgroup-or-domain
> may be you should use the local master browser for this to work
> nmblookup -M <workgroup/domain>
> greez
> -- 
> Michael Gasch
> Max Planck Institute for Evolutionary Anthropology
> Department of Human Evolution (IT)
> Deutscher Platz 6
> D-04103 Leipzig
> Germany
> Phone: 49 (0)341 - 3550 137

More information about the samba mailing list