smbclient -M sends NetBIOS session service header to port 445

Steve Langasek vorlon at
Mon Jan 6 17:36:00 GMT 2003

On Mon, Jan 06, 2003 at 11:08:32AM -0600, Christopher R. Hertel wrote:

> So, smbclient should default to using port 139 for the NetServerEnum2 
> calls (-L option) unless -p is actually specified.  Basically, the same 
> problem as -M.

Ok, that was the same conclusion I arrived at.  I'll put together a
patch to make 'smbclient -M' force a connection to port 139.

> In your example, though, you specify both -M and -p.  Personally, I think
> that in this case smbclient is doing the right thing.  If I enter
> 'smbclient -M server -p 10973', then I would expect smbclient to try
> sending the message to that port.  The defaults should be 'best normal 
> behavior' but smbclient is much more useful if I can bend it to my will.

Well, the -p option was added only for the purpose of being explicit.  In
3.0, port 445 is currently the default port for *all* operations,
including smbclient -M.  So the code does need to change if -M needs port

Steve Langasek
postmodern programmer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url :

More information about the samba-technical mailing list