libsmbclient -I equivalent?

Richard Sharpe rsharpe at
Tue Apr 9 10:16:02 GMT 2002

On Mon, 8 Apr 2002, Mike Rosack wrote:

> I'm trying to upgrade an smbclient-based share crawler I've written to
> libsmbclient and Alain's perl Filesys::SmbClient package.  This is for the
> Georgia Tech campus network, so the crawler will span multiple subnets.
> The problem I'm having is that about half of the clients I query won't
> recognize an IP based smb URL like this: smb://  The
> campus WINS server is flaky, plus there are many duplicate hostnames over
> the various subnets, so using it isn't really the answer in this scenario.
> What I need is some way to write the URL with the hostname like this:
> smb://hostname/share, and pass in the IP address to try to connect to.  Sort
> of like doing this in smbclient:
> smbclient //hostname/share -I
> Is there some way to do this that I'm missing?

OK, I have made a change to the 2.2.x code stream that tries again after 
*SMBSERVER fails, if the server was passed in as an IP address.

Not tested, only built!

Of course, this will be slow, as it will try to connect with the IP 
address as the called name first, then *SMBSERVER, and finally will do a 
name_status request (which takes time) and tries to connect with that name 
as the called name.

Richard Sharpe, rsharpe at, rsharpe at, 
sharpe at

More information about the samba-technical mailing list