[Samba] (no subject)

Joel Hammer Joel at HammersHome.com
Wed Jul 17 19:02:02 GMT 2002


How much experience do you have with linux/unix?
If you are going to navigate this OS, you will have to have some basic
scripting skills and be able to read the manpages. If you don't/can't do
this, stick with NT. 
Did you try the winserver lookup? Often they are used.
The command:
nmblookup -M '-' looks promising.
Why not just turn off nmbd before you run findsmb?
If you have the ip number, try nmblookup -A ipnumber
Here is a simple script to get what you want:

nmblookup '*' -B 192.168.0.0 | sed -n "/^[0-9]/p" | cut -d" " -f1 | xargs -n1 -i{} nmblookup -A {} | grep \<00\>   | grep -v GROUP | sed "s/\t//" | sed "s/ .*//"
You may have to modify this, depending on what sort of output you get from
the various commands.
Then, you can feed these netbios names into your smbclient -M command.
Joel


 Thu, Jul 18, 2002 at 02:07:56AM +0200, Thomas Bork wrote:
> Hallo Joel,
> 
> Joel Hammer schrieb:
> 
> > smbclient -L winserver will show you who the server knows about.
> 
> but often no WINS-Server will be used.
> 
> > findsmb will broadcast for you.
> 
> But the command must be run on a system without nmbd running. If nmbd
> is running on the system, you will only get the IP address and the DNS
> name of the machine. And if you want to send a notification with
> smbclient, you always need the NETBIOS name of the machine(s).
> 
> > But, so will nmblookup '*'.
> 
> nmblookup in 2.2.5 is buggy? Dokumentation says:
> 
> -B <broadcast address>
> Send the query to the given broadcast address. Without this option the
> default behavior of nmblookup is to send the query to the broadcast
> address of the network interfaces as either auto-detected or defined in
> the interfaces parameter of the smb.conf (5) file.
> 
> My interfaces parameter:
> 
> interfaces = 127.0.0.1/8 192.168.0.3/255.255.255.0
> 
> And here is the output:
> 
> linux 1.0 > nmblookup '*'
> querying * on 127.255.255.255
> 192.168.0.3 *<00>
> 
> The second interface is ignored and output only gives IP adresses :o(
> 
> Here is the output with the 2nd interface broadcast adress.
> 
> linux 1.0 > nmblookup '*' -B 192.168.0.255
> querying * on 192.168.0.255
> 192.168.19.1 *<00>
> 192.168.183.1 *<00>
> 192.168.0.7 *<00>
> 192.168.0.3 *<00>
> 192.168.0.5 *<00>
> 192.168.0.10 *<00>
> 
> Only IPs  :o(
> Thats why this is also not the way.
> 
> An option for smbclient for sending messages to a hole subnet wood be
> very nice. It's possible with Windows (NT,2k,XP).
> 
> 
> der tom
> [fli4l-team]
>  __________________________________________________________________
> I                                                                  I
> I ML-Archiv : http://lists.spline.inf.fu-berlin.de/pipermail/fli4l I
> I FAQ       : http://www.fli4l.de/german/extern/faq/faq.htm        I
> I EIS-SAMBA : http://home.arcor.de/tombork/files/eis/eis-list.txt  I
> I__________________________________________________________________I
> 
> 
> -- 
> To unsubscribe from this list go to the following URL and read the
> instructions:  http://lists.samba.org/mailman/listinfo/samba




More information about the samba mailing list