Coerce smbclient with -M option to accept -I addr and "fake" netbios name

Gerald Carter gcarter at
Thu Jul 26 13:45:40 GMT 2001

On Mon, 23 Jul 2001, Neil Goldberg wrote:

> It has occured to me it is sufficient to make connections to manipulate
> shares with smbclient by using the -I option and a "fake" NetBIOS
> name... for example:
> smbclient ///PUBLIC -I would work (not without a small
> complaint about the "" host not existing)
> This is quite useful when creating a web interface to these programs,
> where the NetBIOS name of the clients is not available, but the IP is.
> However, when using smbclient in messaging mode, the result is not the
> same. It seems that you need: a) a valid NetBIOS name or b) a valid
> logged on user's name; to send a windows broadcast message to the
> machine. Is there any way to make it work directed by an IP address,
> without any other information? Is there a solution that exists outside
> of a modification to client/client.c ?

You can do a node status request on the IP addr to get the
NetBIOS name (hint: use nmblookup).  The reason you need a name
is that it is required in the NetBIOS session request.

cheers, jerry
 ---------------------------------------------------------------------         VA Linux Systems              SAMBA Team                          
 --"I never saved anything for the swim back." Ethan Hawk in Gattaca--

More information about the samba-technical mailing list