suggestion for libsmbclient feature

Alexander Vodomerov alex at sectorb.msk.ru
Sat Jan 29 23:14:25 GMT 2005


On Sat, Jan 29, 2005 at 04:42:17PM -0500, Michael B Allen wrote:
> Just curious, but if the names are the same how do you get distinct IPs?
Well, there are really some different networks (with different IP
ranges, DNS zones etc). Networks are divided by geographical location
(different wings and floors of large building). But they all have
routing to each other and have one common WINS server. The name is
unique in one subnetwork and can be properly resolved via DNS. But only
one IP can be registered for NetBIOS name at WINS server. So if two
hosts have the same names, they cannot be distinguished by NetBIOS, but
their IPs can be obtained from DNS.
This is really _wrong_ configuration (no single policy, no domains, no
domain controllers and etc), but it exists is such state for some years
and there are no signs of changes :(
Furthermore, my friend (who lives in different part of town) has even
worse home network: all the same problems + unworking DNS. He nmap's
IP range and then runs nmblookup on responded IPs to determine
hostnames. He got managed to scan such network.

> Well the proper solution for this would be for libsmbclient to automatically
> retry with different CalledNames. The algorithm used by the JCIFS client [1]
> is:
> 
> 	if (IP specified) {
> 		CalledName = '*SMBSERVER'
> 	} else if (hexcode == 0x1D || hexcode == 0x1C) {
> 		CalledName = '*SMBSERVER'
> 	} else {
> 		CalledName = NetBIOS Name [2]
> 	}
If it is DNS domain with all suffixes cut away - it will work in my
case. Can we have such code in libsmbclient? Does it break something?
> 
> [1] The JCIFS client is very very good at quickly crawling large networks.
> There are several crawler examples in the examples directory. The T2Crawler
> example uses multiple worker threads feed from one small master list of
> URLs. This is great performance enhancement because a simple depth first
> search algorithm will result in large numbers of state file attributes.
I don't want to depend on Sun's JVM. Does jCIFS run on some open-source
Java implementation, e.g GCJ? If it does, it changes a lot. May be I
would use it in my project.

With best regards,
   Alexander.


More information about the samba-technical mailing list