Re: samba and browsing

Ken Lai (min-ken.lai@yale.edu)
Mon, 1 Mar 1999 17:39:26 -0500 (EST)

I'm using version 2.0.2 (will go fro 2.0.3 soon) and the nmblookup has a
function to find the browse master! I never knew it could do this (does
the old one have this functions?

'nmblookup -M -' gave me all the browse masters on my subnet.

Here is an excerpt from the man page:
======
NAME
nmblookup - NetBIOS over TCP/IP client used to lookup Net-
BIOS names

...

OPTIONS
-M Searches for a master browser by looking up the
NetBIOS name name with a type of 0x1d. If name is
"-" then it does a lookup on the special name
__MSBROWSE__.
======

On Mon, 1 Mar 1999, Shawn Bayern wrote:

> #!/bin/sh
>
> # Locate all browse-list-maintaining machines on the current subnet.
> # By Shawn Bayern, 3/1/98
>
> for NODE in `nmblookup '*' | tail +2 | awk '{print $1}'`
> do
> echo $NODE
> nmblookup -A $NODE | grep MSBROWSE
> done
>
> It lists all IP addresses on your current subnet that are broadcasting as
> Windows servers, and follows any that maintain browse-lists with the
> NetBIOS-name line from 'nmblookup' that suggests they do. You could
> definitely clean up the output a bit, but this shows the general idea.
>
> The principle is actually really simple; I'm surprised I can't find a
> better way in the Samba distribution to do this, and I definitely wouldn't
> be shocked to learn there's a better way.
>
> Shawn
>

--
# Ken Lai  <min-ken.lai@yale.edu>  also at  ken.lai@WriteMe.com
# http://pantheon.yale.edu/~ml267/     ICQ# 5845632