[Samba] smbclient returns error when NetBIOS disabled on Windows Server

Jeremy Allison jra at samba.org
Fri Apr 29 21:14:14 UTC 2016


On Tue, Apr 26, 2016 at 10:18:26PM +0100, Andrew Watkins wrote:
> Hello,
> 
> I have noticed that smbclient returns an error code when a windows
> server has disabled NetBIOS, but should it do this, if you know
> NetBIOS has been disabled. I think there should be a flag to
> indicate that you don't want to check port 139 (NetBIOS).
> 
> For example the following command which tries to connect to a
> Windows server with NetBIOS disabled returns an ERROR!
> 
> $ smbclient  -L //bloomsburyfs -U wstudent%password
> Domain=[DCSNT] OS=[Windows Server 2008 R2 Enterprise 7601 Service
> Pack 1] Server=[Windows Server 2008 R2 Enterprise 6.1]
>         Sharename       Type      Comment
>         ---------       ----      -------
>         home            Disk      Student home drive share
>         IPC$            IPC       Remote IPC
> resolve_lmhosts: Attempting lmhosts lookup for name bloomsburyfs<0x20>
> resolve_lmhosts: Attempting lmhosts lookup for name bloomsburyfs<0x20>
> resolve_wins: Attempting wins lookup for name bloomsburyfs<0x20>
> resolve_wins: WINS server resolution selected and no WINS servers listed.
> resolve_hosts: Attempting host lookup for name bloomsburyfs<0x20>
> Connecting to 193.61.29.86 at port 139
> Error connecting to 193.61.29.86 (Error 0)
> Connection to bloomsburyfs failed (Error NT_STATUS_UNSUCCESSFUL)
> NetBIOS over TCP disabled -- no workgroup available
> 
> But, it would be good if you could tell "smbclient" that you don't
> want it to check for NetBIOS which means you would not get an ERROR
> code.

The code in 4.4.x is quite sophisticated, in that is by
default tries port 445 and then 5msecs later tries 139.

So it should be trying 445 by default. What is your
smb.conf set to, and can you post a debug level 10 log
from this smbclient command ?



More information about the samba mailing list