The Samba-Bugzilla – Bug 8958
smbclient sends incomplete hostname
Last modified: 2012-05-29 11:20:24 UTC
smbclient -U lukclaes //shares1.ugent.be/test
I get the following response:
Enter lukclaes's password:
session request to SHARES1.UGENT.BE failed (Not listening on called name)
Domain=[FILES] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager]
So it first fails, but tries again and that works.
In attachment the failing session: it sends 'SHARES1.UGENT.B<20>' as called name (note the missing E).
This is a NetBIOS protocol limitation, the called name can only have 15 characters plus service type. The real "bug" might be that we do not strip all but the non-qualified hostname. But that then will fail if the hostname is longer than 15 characters.
Created attachment 7601 [details]
Wireshark dump of failing session
(In reply to comment #1)
> This is a NetBIOS protocol limitation, the called name can only have 15
> characters plus service type. The real "bug" might be that we do not strip all
> but the non-qualified hostname. But that then will fail if the hostname is
> longer than 15 characters.
Right, for NetBIOS it would be better to strip the domain part from the hostname if it can only take 15 characters.
I think the only thing we could do, is to check if the name has more than 15 chars, and then fail the request to port 139 instead of truncating the name.