SOLVED Can't connect to samba from android (kodi and total commander)

asimov-solensan

Contributor
Joined
Oct 14, 2016
Messages
113
Hello,

I think I need some help here. I don't use this two programs that much but just found that at some point they stopped working. I'm on 11.1 but can't tell when they begun to fail.

No network problems since I checked with tcpdump and smb works on my other computers.

At first kodi didn't generate any log on freenas until I changed option to full logging then I got this:

Code:
[2018/12/28 08:51:34.538502,  3] ../lib/util/access.c:361(allow_access)
  Allowed connection from 192.168.16.241 (192.168.16.241)
[2018/12/28 08:51:34.538656,  3] ../source3/smbd/oplock.c:1329(init_oplocks)
  init_oplocks: initializing messages.
[2018/12/28 08:51:34.538744,  3] ../source3/smbd/process.c:1959(process_smb)
  Transaction 0 of length 194 (0 toread)
[2018/12/28 08:51:34.538770,  3] ../source3/smbd/process.c:1539(switch_message)
  switch message SMBnegprot (pid 39789) conn 0x0
[2018/12/28 08:51:34.539590,  3] ../source3/smbd/negprot.c:612(reply_negprot)
  Requested protocol [PC NETWORK PROGRAM 1.0]
[2018/12/28 08:51:34.539618,  3] ../source3/smbd/negprot.c:612(reply_negprot)
  Requested protocol [MICROSOFT NETWORKS 1.03]
[2018/12/28 08:51:34.539649,  3] ../source3/smbd/negprot.c:612(reply_negprot)
  Requested protocol [MICROSOFT NETWORKS 3.0]
[2018/12/28 08:51:34.539699,  3] ../source3/smbd/negprot.c:612(reply_negprot)
  Requested protocol [LANMAN1.0]
[2018/12/28 08:51:34.539760,  3] ../source3/smbd/negprot.c:612(reply_negprot)
  Requested protocol [LM1.2X002]
[2018/12/28 08:51:34.539794,  3] ../source3/smbd/negprot.c:612(reply_negprot)
  Requested protocol [DOS LANMAN2.1]
[2018/12/28 08:51:34.539818,  3] ../source3/smbd/negprot.c:612(reply_negprot)
  Requested protocol [LANMAN2.1]
[2018/12/28 08:51:34.539842,  3] ../source3/smbd/negprot.c:612(reply_negprot)
  Requested protocol [Samba]
[2018/12/28 08:51:34.539868,  3] ../source3/smbd/negprot.c:612(reply_negprot)
  Requested protocol [NT LANMAN 1.0]
[2018/12/28 08:51:34.539892,  3] ../source3/smbd/negprot.c:612(reply_negprot)
  Requested protocol [NT LM 0.12]
[2018/12/28 08:51:34.540021,  3] ../source3/smbd/negprot.c:738(reply_negprot)
  reply_negprot: No protocol supported !
[2018/12/28 08:51:34.540842,  3] ../source3/smbd/server_exit.c:248(exit_server_common)
  Server exit (no protocol supported
  )


And total commander this:

Code:
[2018/12/28 08:55:31.169978,  3] ../lib/util/access.c:361(allow_access)
  Allowed connection from 192.168.16.241 (192.168.16.241)
[2018/12/28 08:55:31.170110,  3] ../source3/smbd/oplock.c:1329(init_oplocks)
  init_oplocks: initializing messages.
[2018/12/28 08:55:31.170195,  3] ../source3/smbd/process.c:1959(process_smb)
  Transaction 0 of length 51 (0 toread)
[2018/12/28 08:55:31.170222,  3] ../source3/smbd/process.c:1539(switch_message)
  switch message SMBnegprot (pid 40244) conn 0x0
[2018/12/28 08:55:31.171028,  3] ../source3/smbd/negprot.c:612(reply_negprot)
  Requested protocol [NT LM 0.12]
[2018/12/28 08:55:31.171106,  3] ../source3/smbd/negprot.c:738(reply_negprot)
  reply_negprot: No protocol supported !
[2018/12/28 08:55:31.171801,  3] ../source3/smbd/server_exit.c:248(exit_server_common)
  Server exit (no protocol supported
  )
[2018/12/28 08:55:31.200936,  3] ../source3/lib/util_procid.c:54(pid_to_procid)
  pid_to_procid: messaging_dgm_get_unique failed: No such file or directory
[2018/12/28 08:55:34.388857,  3] ../lib/util/access.c:361(allow_access)
  Allowed connection from 192.168.16.241 (192.168.16.241)
[2018/12/28 08:55:34.389017,  3] ../source3/smbd/oplock.c:1329(init_oplocks)
  init_oplocks: initializing messages.
[2018/12/28 08:55:34.389114,  3] ../source3/smbd/process.c:1959(process_smb)
  Transaction 0 of length 61 (0 toread)
[2018/12/28 08:55:34.389142,  3] ../source3/smbd/process.c:1539(switch_message)
  switch message SMBnegprot (pid 40245) conn 0x0
[2018/12/28 08:55:34.390015,  3] ../source3/smbd/negprot.c:612(reply_negprot)
  Requested protocol [SMB 2.002]
[2018/12/28 08:55:34.390053,  3] ../source3/smbd/negprot.c:612(reply_negprot)
  Requested protocol [SMB 2.???]
[2018/12/28 08:55:34.390247,  3] ../source3/smbd/smb2_negprot.c:290(smbd_smb2_request_process_negprot)
  Selected protocol SMB2_FF
[2018/12/28 08:55:34.390853,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'gssapi_spnego' registered
[2018/12/28 08:55:34.390880,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'gssapi_krb5' registered
[2018/12/28 08:55:34.390909,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'gssapi_krb5_sasl' registered
[2018/12/28 08:55:34.390945,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'spnego' registered
[2018/12/28 08:55:34.390994,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'schannel' registered
[2018/12/28 08:55:34.391043,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'naclrpc_as_system' registered
[2018/12/28 08:55:34.391101,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'sasl-EXTERNAL' registered
[2018/12/28 08:55:34.391185,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'ntlmssp' registered
[2018/12/28 08:55:34.391268,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'ntlmssp_resume_ccache' registered
[2018/12/28 08:55:34.391318,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'http_basic' registered
[2018/12/28 08:55:34.391355,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'http_ntlm' registered
[2018/12/28 08:55:34.391392,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'krb5' registered
[2018/12/28 08:55:34.391423,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'fake_gssapi_krb5' registered
[2018/12/28 08:55:34.391571,  3] ../source3/smbd/negprot.c:753(reply_negprot)
  Selected protocol SMB 2.???
[2018/12/28 08:55:34.399199,  3] ../source3/smbd/smb2_negprot.c:290(smbd_smb2_request_process_negprot)
  Selected protocol SMB2_10
[2018/12/28 08:55:34.417118,  3] ../auth/ntlmssp/ntlmssp_util.c:69(debug_ntlmssp_flags)
  Got NTLMSSP neg_flags=0xe0888215
[2018/12/28 08:55:34.439672,  3] ../auth/ntlmssp/ntlmssp_server.c:454(ntlmssp_server_preauth)
  Got user=[] domain=[] workstation=[] len1=0 len2=152
[2018/12/28 08:55:34.439801,  3] ../source3/param/loadparm.c:3856(lp_load_ex)
  lp_load_ex: refreshing parameters
[2018/12/28 08:55:34.439903,  3] ../source3/param/loadparm.c:543(init_globals)
  Initialising global parameters
[2018/12/28 08:55:34.440057,  3] ../source3/param/loadparm.c:2770(lp_do_section)
  Processing section "[global]"
[2018/12/28 08:55:34.440538,  1] ../lib/param/loadparm.c:1823(lpcfg_do_global_parameter)
  WARNING: The "null passwords" option is deprecated
[2018/12/28 08:55:34.441011,  2] ../source3/param/loadparm.c:2787(lp_do_section)
  Processing section "[private]"
[2018/12/28 08:55:34.441261,  2] ../source3/param/loadparm.c:2787(lp_do_section)
  Processing section "[shared]"
[2018/12/28 08:55:34.441514,  3] ../source3/param/loadparm.c:1598(lp_add_ipc)
  adding IPC service
[2018/12/28 08:55:34.441546,  3] ../source3/auth/auth.c:189(auth_check_ntlm_password)
  check_ntlm_password:  Checking password for unmapped user []\[]@[] with the new password interface
[2018/12/28 08:55:34.441594,  3] ../source3/auth/auth.c:192(auth_check_ntlm_password)
  check_ntlm_password:  mapped user is: []\[]@[]
[2018/12/28 08:55:34.441705,  3] ../source3/auth/check_samsec.c:399(check_sam_security)
  check_sam_security: Couldn't find user '' in passdb.
[2018/12/28 08:55:34.441743,  2] ../source3/auth/auth.c:332(auth_check_ntlm_password)
  check_ntlm_password:  Authentication for user [] -> [] FAILED with error NT_STATUS_NO_SUCH_USER, authoritative=1
[2018/12/28 08:55:34.441818,  2] ../auth/auth_log.c:760(log_authentication_event_human_readable)
  Auth: [SMB2,(null)] user []\[] at [Fri, 28 Dec 2018 08:55:34.441788 CET] with [NTLMv2] status [NT_STATUS_NO_SUCH_USER] workstation [] remote host [ipv4:192.168.16.241:34631] mapped to []\[]. local host [ipv4:192.168.17.10:445]
[2018/12/28 08:55:34.441889,  3] ../auth/auth_log.c:591(log_no_json)
  log_no_json: JSON auth logs not available unless compiled with jansson
[2018/12/28 08:55:34.441919,  3] ../source3/auth/auth_util.c:1626(do_map_to_guest_server_info)
  No such user  [] - using guest account
[2018/12/28 08:55:34.451702,  0] ../libcli/smb/smb2_signing.c:171(smb2_signing_check_pdu)
  Bad SMB2 signature for message
[2018/12/28 08:55:34.451750,  0] ../lib/util/util.c:515(dump_data)
  [0000] F8 84 B6 57 12 BA F0 3D   67 97 C5 B4 9C 10 9C F4   ...W...= g.......
[2018/12/28 08:55:34.451775,  0] ../lib/util/util.c:515(dump_data)
  [0000] EB BA F0 77 A7 47 1A 58   80 EC 79 7D 0E 99 EE BB   ...w.G.X ..y}....
[2018/12/28 08:55:34.451799,  3] ../source3/smbd/smb2_server.c:3115(smbd_smb2_request_error_ex)
  smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[1] status[NT_STATUS_ACCESS_DENIED] || at ../source3/smbd/smb2_server.c:2423


Both programs show protocol no supported error and I read this may be due to freenas allowing only SMB3 so y added "min protocol = SMB2" to the configuration on the GUI (note that min protocol = SMB1 won't allow me to start the service). Then I got this on samba logs:

From kodi:

Code:
[2018/12/28 09:20:37.676992,  3] ../lib/util/access.c:361(allow_access)
  Allowed connection from 192.168.16.241 (192.168.16.241)
[2018/12/28 09:20:37.677125,  3] ../source3/smbd/oplock.c:1329(init_oplocks)
  init_oplocks: initializing messages.
[2018/12/28 09:20:37.677184,  3] ../source3/smbd/process.c:1959(process_smb)
  Transaction 0 of length 194 (0 toread)
[2018/12/28 09:20:37.677209,  3] ../source3/smbd/process.c:1539(switch_message)
  switch message SMBnegprot (pid 52387) conn 0x0
[2018/12/28 09:20:37.678125,  3] ../source3/smbd/negprot.c:612(reply_negprot)
  Requested protocol [PC NETWORK PROGRAM 1.0]
[2018/12/28 09:20:37.678159,  3] ../source3/smbd/negprot.c:612(reply_negprot)
  Requested protocol [MICROSOFT NETWORKS 1.03]
[2018/12/28 09:20:37.678176,  3] ../source3/smbd/negprot.c:612(reply_negprot)
  Requested protocol [MICROSOFT NETWORKS 3.0]
[2018/12/28 09:20:37.678190,  3] ../source3/smbd/negprot.c:612(reply_negprot)
  Requested protocol [LANMAN1.0]
[2018/12/28 09:20:37.678204,  3] ../source3/smbd/negprot.c:612(reply_negprot)
  Requested protocol [LM1.2X002]
[2018/12/28 09:20:37.678218,  3] ../source3/smbd/negprot.c:612(reply_negprot)
  Requested protocol [DOS LANMAN2.1]
[2018/12/28 09:20:37.678232,  3] ../source3/smbd/negprot.c:612(reply_negprot)
  Requested protocol [LANMAN2.1]
[2018/12/28 09:20:37.678246,  3] ../source3/smbd/negprot.c:612(reply_negprot)
  Requested protocol [Samba]
[2018/12/28 09:20:37.678260,  3] ../source3/smbd/negprot.c:612(reply_negprot)
  Requested protocol [NT LANMAN 1.0]
[2018/12/28 09:20:37.678274,  3] ../source3/smbd/negprot.c:612(reply_negprot)
  Requested protocol [NT LM 0.12]
[2018/12/28 09:20:37.678354,  3] ../source3/smbd/negprot.c:738(reply_negprot)
  reply_negprot: No protocol supported !
[2018/12/28 09:20:37.679156,  3] ../source3/smbd/server_exit.c:248(exit_server_common)
  Server exit (no protocol supported
  )
[2018/12/28 09:20:37.765185,  3] ../source3/lib/util_procid.c:54(pid_to_procid)
  pid_to_procid: messaging_dgm_get_unique failed: No such file or directory


And on total commander:

Code:
[2018/12/28 09:21:35.803121,  3] ../lib/util/access.c:361(allow_access)
  Allowed connection from 192.168.16.241 (192.168.16.241)
[2018/12/28 09:21:35.803250,  3] ../source3/smbd/oplock.c:1329(init_oplocks)
  init_oplocks: initializing messages.
[2018/12/28 09:21:35.803309,  3] ../source3/smbd/process.c:1959(process_smb)
  Transaction 0 of length 61 (0 toread)
[2018/12/28 09:21:35.803333,  3] ../source3/smbd/process.c:1539(switch_message)
  switch message SMBnegprot (pid 52746) conn 0x0
[2018/12/28 09:21:35.804140,  3] ../source3/smbd/negprot.c:612(reply_negprot)
  Requested protocol [SMB 2.002]
[2018/12/28 09:21:35.804171,  3] ../source3/smbd/negprot.c:612(reply_negprot)
  Requested protocol [SMB 2.???]
[2018/12/28 09:21:35.804332,  3] ../source3/smbd/smb2_negprot.c:290(smbd_smb2_request_process_negprot)
  Selected protocol SMB2_FF
[2018/12/28 09:21:35.804967,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'gssapi_spnego' registered
[2018/12/28 09:21:35.804992,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'gssapi_krb5' registered
[2018/12/28 09:21:35.805019,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'gssapi_krb5_sasl' registered
[2018/12/28 09:21:35.805047,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'spnego' registered
[2018/12/28 09:21:35.805128,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'schannel' registered
[2018/12/28 09:21:35.805202,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'naclrpc_as_system' registered
[2018/12/28 09:21:35.805252,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'sasl-EXTERNAL' registered
[2018/12/28 09:21:35.805389,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'ntlmssp' registered
[2018/12/28 09:21:35.805493,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'ntlmssp_resume_ccache' registered
[2018/12/28 09:21:35.805520,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'http_basic' registered
[2018/12/28 09:21:35.805546,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'http_ntlm' registered
[2018/12/28 09:21:35.805595,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'krb5' registered
[2018/12/28 09:21:35.805721,  3] ../auth/gensec/gensec_start.c:977(gensec_register)
  GENSEC backend 'fake_gssapi_krb5' registered
[2018/12/28 09:21:35.805871,  3] ../source3/smbd/negprot.c:753(reply_negprot)
  Selected protocol SMB 2.???
[2018/12/28 09:21:35.811628,  3] ../source3/smbd/smb2_negprot.c:290(smbd_smb2_request_process_negprot)
  Selected protocol SMB2_10
[2018/12/28 09:21:35.821421,  3] ../auth/ntlmssp/ntlmssp_util.c:69(debug_ntlmssp_flags)
  Got NTLMSSP neg_flags=0xe0888215
[2018/12/28 09:21:35.836910,  3] ../auth/ntlmssp/ntlmssp_server.c:454(ntlmssp_server_preauth)
  Got user=[] domain=[] workstation=[] len1=0 len2=152
[2018/12/28 09:21:35.836996,  3] ../source3/param/loadparm.c:3856(lp_load_ex)
  lp_load_ex: refreshing parameters
[2018/12/28 09:21:35.837086,  3] ../source3/param/loadparm.c:543(init_globals)
  Initialising global parameters
[2018/12/28 09:21:35.837230,  3] ../source3/param/loadparm.c:2770(lp_do_section)
  Processing section "[global]"
[2018/12/28 09:21:35.837691,  1] ../lib/param/loadparm.c:1823(lpcfg_do_global_parameter)
  WARNING: The "null passwords" option is deprecated
[2018/12/28 09:21:35.837969,  2] ../source3/param/loadparm.c:2787(lp_do_section)
  Processing section "[private]"
[2018/12/28 09:21:35.838223,  2] ../source3/param/loadparm.c:2787(lp_do_section)
  Processing section "[shared]"
[2018/12/28 09:21:35.838477,  3] ../source3/param/loadparm.c:1598(lp_add_ipc)
  adding IPC service
[2018/12/28 09:21:35.838511,  3] ../source3/auth/auth.c:189(auth_check_ntlm_password)
  check_ntlm_password:  Checking password for unmapped user []\[]@[] with the new password interface
[2018/12/28 09:21:35.838528,  3] ../source3/auth/auth.c:192(auth_check_ntlm_password)
  check_ntlm_password:  mapped user is: []\[]@[]
[2018/12/28 09:21:35.838572,  3] ../source3/auth/check_samsec.c:399(check_sam_security)
  check_sam_security: Couldn't find user '' in passdb.
[2018/12/28 09:21:35.838671,  2] ../source3/auth/auth.c:332(auth_check_ntlm_password)
  check_ntlm_password:  Authentication for user [] -> [] FAILED with error NT_STATUS_NO_SUCH_USER, authoritative=1
[2018/12/28 09:21:35.838809,  2] ../auth/auth_log.c:760(log_authentication_event_human_readable)
  Auth: [SMB2,(null)] user []\[] at [Fri, 28 Dec 2018 09:21:35.838772 CET] with [NTLMv2] status [NT_STATUS_NO_SUCH_USER] workstation [] remote host [ipv4:192.168.16.241:34657] mapped to []\[]. local host [ipv4:192.168.17.10:445]
[2018/12/28 09:21:35.838841,  3] ../auth/auth_log.c:591(log_no_json)
  log_no_json: JSON auth logs not available unless compiled with jansson
[2018/12/28 09:21:35.838859,  3] ../source3/auth/auth_util.c:1626(do_map_to_guest_server_info)
  No such user  [] - using guest account
[2018/12/28 09:21:35.845251,  0] ../libcli/smb/smb2_signing.c:171(smb2_signing_check_pdu)
  Bad SMB2 signature for message
[2018/12/28 09:21:35.845297,  0] ../lib/util/util.c:515(dump_data)
  [0000] C3 C4 D4 59 1C 2A 8A 08   2A E0 9A 18 70 66 E4 E6   ...Y.*.. *...pf..
[2018/12/28 09:21:35.845333,  0] ../lib/util/util.c:515(dump_data)
  [0000] A3 33 2A 6D 92 3B B5 D8   44 F8 96 A4 E5 F8 A1 24   .3*m.;.. D......$
[2018/12/28 09:21:35.845392,  3] ../source3/smbd/smb2_server.c:3115(smbd_smb2_request_error_ex)
  smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[1] status[NT_STATUS_ACCESS_DENIED] || at ../source3/smbd/smb2_server.c:2423



This time the errors seems to differ but I'm still stuck on protocol no supported for kodi. Total commander on the other hand seems to send a null username although I'm clearly using "nobody" as user.

At this point can't be sure is problems are related or not. But I want to ask before touching options I don't understand.

Any idea?
 

asimov-solensan

Contributor
Joined
Oct 14, 2016
Messages
113
Ok, just an update.

Kodi problem was indeed a version limitation. It only supports SMB1, i can't configure it from the auxiliary parameters but it works if set from tunables. Got the instructions here:

https://forums.freenas.org/index.php?threads/changes-in-smb-for-11-1u5-to-11-1u6.69442/

As told in the other thread. It's not advised to do this, so maybe it's worth to use NFS for kodi because from what I read the situation won't change in the near future.

Let's focus this thread on the problem wit total commander please.
 

asimov-solensan

Contributor
Joined
Oct 14, 2016
Messages
113
Can't know why but seems that the problem with total commander solved by itself. Or at least I don't remember changing any option.
 
Joined
Jun 19, 2019
Messages
1
Have you tried your best and unable to find any solution for this error? If yes, then don't worry, as I have the solution for this error. So, first of all, you have to know about this error and then implement the solution.

Simply visit this link for the exact solution for this error.
 
Top