[Samba] CIFS share disconnects on Linux client, but is still accessible via SMBCLIENT

Gene Poole landrlatz at free.fr
Tue Jul 27 08:01:00 UTC 2021


Hello and thanks again for being willing to help.

The CIFS troubleshooting page you mentioned says "The best place to ask 
for help with Linux CIFS
is on the linux-cifs mailing list 
<http://vger.kernel.org/vger-lists.html#linux-cifs>." I've theoretically 
been subscribed to that list for a couple of weeks, but have received 
nothing
from it as yet, so I don't know how to post to it if it's indeed active.
Let me know if you know of another place I could go with this problem.

I have set /proc/fs/cifs/cifsFYI to 7 per that troubleshooting page. 
When I try to ls the share after it becomes inaccessible,
I see no CIFS error in dmesg. If I succeed in unmounting the mount point 
(/mnt/Work) and then try to mount, I get

[mar. juil. 27 06:29:40 2021] CIFS: Attempting to mount //xxx.xxx.x.xx/Work
[mar. juil. 27 06:29:40 2021] CIFS VFS: cifs_mount failed w/return code = -2

I presume the "-2" is the same as the "mount error(2): No such file or 
directory" that I get when I try ls.

The samba log shows the following:

---------------------------------------------------------------------------------------------

[2021/07/27 06:40:22.380472,  3] 
../../source3/smbd/smb2_server.c:3264(smbd_smb2_request_error_ex)
   smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[1] 
status[NT_STATUS_NOT_FOUND] || at ../../source3/smbd/smb2_ioctl.c:312
[2021/07/27 06:40:28.575004,  4] 
../../source3/smbd/sec_ctx.c:319(set_sec_ctx_internal)
   setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2021/07/27 06:40:34.668884,  4] 
../../source3/smbd/sec_ctx.c:319(set_sec_ctx_internal)
   setting sec ctx (65534, 65534) - sec_ctx_stack_ndx = 0
[2021/07/27 06:40:34.669175,  4] 
../../source3/smbd/sec_ctx.c:319(set_sec_ctx_internal)
   setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2021/07/27 06:40:34.669384,  4] 
../../source3/smbd/sec_ctx.c:319(set_sec_ctx_internal)
   setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2021/07/27 06:40:34.669527,  4] 
../../source3/smbd/sec_ctx.c:319(set_sec_ctx_internal)
   setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2021/07/27 06:40:34.669654,  3] 
../../source3/smbd/service.c:1148(close_cnum)
   ethiquable (ipv4:xxx.xxx.x.xx:1105) closed connection to service IPC$

-----------------------(note that the samba log is still showing failed 
attempts to connect with an NTLMv1 password--------------------------------

And here is what's in /proc/fs/cifs/DebugData:

----------------------------------------------------------------------

Display Internal CIFS Data Structures for Debugging
---------------------------------------------------
CIFS Version 2.26
Features: 
DFS,FSCACHE,STATS,DEBUG,ALLOW_INSECURE_LEGACY,WEAK_PW_HASH,CIFS_POSIX,UPCALL(SPNEGO),XATTR,ACL
CIFSMaxBufSize: 16384
Active VFS Requests: 0
Servers:
Number of credits: 126 Dialect 0x210
1) Name: xxx.xxx.x.xx Uses: 1 Capability: 0x300007    Session Status: 1 
TCP status: 3 Instance: 1
     Local Users To Server: 1 SecMode: 0x1 Req On Wire: 0 In Send: 0 In 
MaxReq Wait: 0 SessionId: 0x40000000001
     Shares:
     0) IPC: \\xxx.xxx.x.xx\IPC$ Mounts: 1 DevInfo: 0x0 Attributes: 0x0
     PathComponentMax: 0 Status: 1 type: 0 Serial Number: 0x0 DISCONNECTED

     1) \\xxx.xxx.x.xx\Work Mounts: 1 DevInfo: 0x20 Attributes: 0xc700ff
     PathComponentMax: 255 Status: 1 type: DISK Serial Number: 0x0    
DISCONNECTED

     MIDs:
-------------------------------------------------------------------------------------------------------
TIA for any help!

On 26/07/2021 07:03, Jonathon Reinhart wrote:
> If I understand your problem correctly, a Linux CIFS client is
> periodically disconnecting from a Windows CIFS (SMB) server. Is that
> correct? If so, Samba isn't actually involved, except for the fact
> that you're using smbclient for troubleshooting.
>
> I would suggest you attack the problem from the perspective of the
> problematic Linux client. Start here:
>
> https://wiki.samba.org/index.php/LinuxCIFS_troubleshooting
>
> On Mon, Jul 26, 2021 at 12:15 AM Gene Poole via samba
> <samba at lists.samba.org> wrote:
>> Hello. I'm still trying to solve this problem. To sum up:
>>
>> On boot, with the following mount line in fstab:
>>
>> //192.xxx.x.xx/Work /mnt/Work cifs
>> credentials=/home/alarm/.smbcredentials,iocharset=utf8,gid=1000,uid=1000,file_mode=0777,dir_mode=0777
>> 0 0
>>
>> the Windows share Work mounts and is accessible for read-write. But
>> after about 20 minutes it becomes inaccessible
>> and throws the error "Host is down".  Trying to re-mount it throws the
>> error "No such file or directory".
>> But it remains accessible via SMBCLIENT with the following command:
>>
>> smbclient -A /home/alarm/.smbcredentials //192.xxx.x.xx/Work
>>
>> The samba log is showing the following (ETHIQUABLE is the netbios name
>> of the Windows host,
>> on which is an account with the same samba credentials as on the Linux
>> client).
>> Please note the references to NTLMv1:
>>
>> ---------------------------------------------------------------------------------------------------------------
>>
>> [2021/07/26 03:20:53.375603,  2]
>> ../../auth/auth_log.c:635(log_authentication_event_human_readable)
>>
>>     Auth: [SMB2,(null)] user [ETHIQUABLE]\[alarm] at [Mon, 26 Jul 2021
>> 03:20:53.375512 UTC] with [NTLMv1] status [NT_STATUS_WRONG_PASSWORD]
>> workstation [ETHIQUABLE] remote host [ipv4:192.xxx.x.xx:11518] mapped to
>> [ETHIQUABLE]\[alarm]. local host [ipv4:192.xxx.x.xx:445]
>>
>> -snip-
>>
>> "NT_STATUS_WRONG_PASSWORD", "localAddress": "ipv4:192.xxx.x.xx:445",
>> "remoteAddress": "ipv4:192.xxx.x.xx:11518", "serviceDescription":
>> "SMB2", "authDescription": null, "clientDomain":
>>
>> -snip-
>>
>>     gensec_spnego_server_negTokenTarg_step: SPNEGO(ntlmssp) login failed:
>> NT_STATUS_WRONG_PASSWORD
>>
>> -snip-
>>
>> [2021/07/26 03:25:43.505589,  2]
>> ../../libcli/auth/ntlm_check.c:472(ntlm_password_check)
>>     ntlm_password_check: NTLMv1 passwords NOT PERMITTED for user alarm
>> [2021/07/26 03:25:43.505713,  3]
>> ../../libcli/auth/ntlm_check.c:479(ntlm_password_check)
>>     ntlm_password_check: NEITHER LanMan nor NT password supplied for user
>> alarm
>> [2021/07/26 03:25:43.505812,  4]
>> ../../source3/smbd/sec_ctx.c:215(push_sec_ctx)
>> -------------------------------------------------------------------------------------------------
>>
>> Why are there references to NTLMv1 when samba (I have v 4.14.5)
>> supposedly no longer uses it, it is not specified in fstab or in smb.conf,
>> and it has been disabled on the Windows computer?
>> Could this be related to the cause of the problem? I will be happy to
>> post any information that might be needed.
>>
>>
>> --
>> To unsubscribe from this list go to the following URL and read the
>> instructions:  https://lists.samba.org/mailman/options/samba
>



More information about the samba mailing list