微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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”

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

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

原文地址:https://www.jb51.cc/ubuntu/348585.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐