Bug 10266 - smbclient cannot detect domain(workgroup) OS and server version
smbclient cannot detect domain(workgroup) OS and server version
Status: NEW
Product: Samba 4.1 and newer
Classification: Unclassified
Component: libsmbclient
4.1.1
All All
: P5 enhancement
: ---
Assigned To: Samba QA Contact
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-13 22:11 UTC by Thomas Bork
Modified: 2015-07-31 08:51 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Bork 2013-11-13 22:11:22 UTC
smbclient from Samba 3.6.x shows the complete information

Domain=[TOMMAIK] OS=[Unix] Server=[Samba 3.6.19-for-eisfair-1-patch-1]

if is connecting to himself with

smbclient //test/tb -Utb

smbclient from Samba 4.1.x only shows
Domain=[TEST] OS=[] Server=[]

test # smbclient -V
Version 4.1.2-UNKNOWN-for-eisfair-1-patch-1
test # smbclient //test/tb -d3 -Utb
lp_load_ex: refreshing parameters
Initialising global parameters
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
params.c:pm_process() - Processing configuration file "/etc/smb.conf"
Processing section "[global]"
interpret_interface: Adding interface 127.0.0.1/8
added interface 127.0.0.1/8 ip=127.0.0.1 bcast=127.255.255.255 netmask=255.0.0.0
interpret_interface: Adding interface 192.168.0.8/255.255.255.0
added interface 192.168.0.8/255 ip=192.168.0.8 bcast=192.168.0.255 netmask=255.255.255.0
Client started (version 4.1.2-UNKNOWN-for-eisfair-1-patch-1).
Enter tb's password:
resolve_lmhosts: Attempting lmhosts lookup for name test<0x20>
resolve_lmhosts: Attempting lmhosts lookup for name test<0x20>
resolve_hosts: Attempting host lookup for name test<0x20>
Connecting to 192.168.0.8 at port 445
Doing spnego session setup (blob length=74)
got OID=1.3.6.1.4.1.311.2.2.10
got principal=not_defined_in_RFC4178@please_ignore
Got challenge flags:
Got NTLMSSP neg_flags=0x608a8215
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x60088215
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x60088215
Domain=[TEST] OS=[] Server=[]
smb: \>
Comment 1 Björn Jacke 2013-11-14 11:11:38 UTC
you write smbclient but you chose the component libsmbclient, so I guess the component was just not the right? And you just changed smbclient and used the same server?

I just tested with current master's smbd in classic mode and current master's smbclient shows:

Domain=[MYDOM] OS=[Unix] Server=[Samba 4.2.0pre1-DEVELOPERBUILD]
Comment 2 Jeremy Allison 2013-11-14 18:21:48 UTC
Actually this is a difference between the SMB1 sessionsetup (where the info is shown) and SMB2 sessionsetup (where it is not). Can be easily reproduced by:

$ /usr/local/samba/bin/smbclient //127.0.0.1/tmp -Uuser%pass
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 4.1.2-GIT-98d5a51]
smb: \> 
$ /usr/local/samba/bin/smbclient //127.0.0.1/tmp -Uuser%pass -mSMB3
Domain=[SAMBA2] OS=[] Server=[]

I'll investigate.

Jeremy.
Comment 3 Thomas Bork 2013-11-14 19:34:26 UTC
> you write smbclient but you chose the component libsmbclient, so I guess the
> component was just not the right? And you just changed smbclient and used the
> same server?

If creating a new bug I cannot choose a component 'smbclient'. So:
In which category fits smbclient (File services, Other, Tools)?

> I just tested with current master's smbd in classic mode and current master's
> smbclient shows:
> Domain=[MYDOM] OS=[Unix] Server=[Samba 4.2.0pre1-DEVELOPERBUILD]

Seems like a problem with SMB2. I have

client max protocol = SMB3

in my smb.conf.
Comment 4 Jeremy Allison 2013-11-14 22:36:51 UTC
Ok, the problem is those strings simply aren't returned in the SMB2 sessionsetup reply. So there's nothing we can use to fill them.

Can't see a way to fix this. Suggestions welcome ?

Jeremy.
Comment 5 Stefan Metzmacher 2015-07-31 08:51:03 UTC
This can't be fixed, we may want to indicate that SMB2/3 was used,
but this is not really a regression...