ubuntu – 在WannaCry补丁和更新后10分钟后从Linux客户端访问时,Windows 2008共享超时

一点背景

>我们有一台Windows 2008服务器,用户可以使用它来存储各种数据.
>它有一个特定文件夹的smb共享,需要几个Ubunutu服务器通过cifs访问.
>直到最近我们不得不修补Windows服务器以抵御WannaCry攻击.
>还更新了ubuntu服务器(运行Ubuntu 16.04.02 LTS)
>除了更新没有任何改变 – 所有配置都是相同的,并且工作了好几年.
>网络没有变化

问题:

现在,如果客户端不访问它,Windows 2008服务器上的samba共享会在几分钟(大约10)后超时. (通常它每隔几个小时就会发生一次,当导入或导出需要从共享中提取或保存到它时).要清楚 – 共享在Ubuntu客户端上安装并按预期工作,如果没有进程使用该连接,它会在几分钟后超时.

临时解决方案:我们设置cron任务,每隔5分钟触摸一次Windows共享文件以保持连接活动. – 这没有“帮助

结束了每隔5分钟运行mount -a的sudo用户设置cron任务.

我想找出原因并提出长期解决方案.

编辑:

每条评论

我在/ etc / fstab中的mount命令(用caps替换了敏感信息)

//SERVER.HOST.NAME/apidata /var/www/pai3/shared/data/production/k_drive/data cifs username=USER,password=PASS,iocharset=utf8,sec=ntlm,workgroup=DOMAIN.COM,rw,uid=1000   0  0
CIFS and SMB Timeout in Windows

Idle Connection Timer

This is the amount of time that a connection can be idle before being
disconnected. An idle connection is defined as a connection which has
no existing open handles (no open files,directories,search contexts,
etc.),and no pending operation. The Idle Connection Timer is
implementation-specific. When the server receives a message,
Server.Connection.IdleTime is set to the current time plus
Server.AutodisconnectTimeout [MS-CIFS].

On Windows servers it can be
configured through the Autodisconnect registry key [KB297684].
\HKLM\SYstem\CurrentControlSet\Services\LanmanServer\Parameters\ Value
type: Dword Value name: Autodisconnect Default: 15 (minutes)

The Autodisconnect can also be configured through group policy: Computer
Configuration\Windows Settings\Security Settings\Local
Policies\Security Options “Microsoft network server: Amount of idle
time required before suspending session”

也许更新已更改或重置其中一个参数.

我建议您首先尝试使用组策略,如果失败,则直接编辑注册表.

相关文章

目录前言一、创建Hadoop用户二、更新apt和安装Vim编辑器三、...
原文连接:https://www.cnblogs.com/yasmi/p/5192694.html ...
电脑重启后,打开VirtualBox,发现一直用的虚拟机莫名的消失...
参见:https://blog.csdn.net/weixin_38883338/article/deta...
Ubuntu 18.04 LTS 已切换到 Netplan 来配置网络接口。Netpla...
介绍每个 Web 服务都可以通过特定的 URL 在 Internet 上访问...