Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatic discovery of machine names 1

Status
Not open for further replies.

TonyGroves

Programmer
Joined
Aug 13, 2003
Messages
2,389
Location
IE
Windows can automatically discover the names of all SMB servers in a LAN, but I can't find anything similar in Samba. I've read all the Samba documentation I can find, but no luck.

I'm a newcomer to Samba (and Linux!), so am I missing something simple?
 
Machine discovery is not a server methodology. It's a client methodology.

Samba is bundled with a number of SMB client utilities. smbtree, for example, can provide a hierarchical tree view of the machines and shares on a network.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Ah yes, that looks like it should do it!

Thanks.
 
I don't have smbtree and I use something like this:
smbclient -N -L "$(nmblookup -S -M - | awk '/<20>/{print $1;exit}')" | awk '$1=="Server",NF==0'

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Hmm ... it seems I don't have smbtree either. I'll take a note of your solution, PHV, but the latest Samba version might include smbtree, so I'll try downloading that first.

Thanks.
 
If your preferred install system has a package named similarly to "smb-client", the utility might be in there.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
I have "samba-client" installed, and smbclient works OK, but a search for files named smbtree* produces nothing. I notice my Samba package is version 2.2.7, dated March 2003, but the latest version at is 3.0. Could it be that smbtree is a recent addition to the Samba package?
 
Possibly. I'm running Samba 3.x.x.

The software seems to be Samba-standard, not something that is part of my Linux distribution. An online man page for smbtree appears here


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top