如何让 Samba 使用 SMBv2 版本
近日来因为WannaCry勒索病毒的关系,大家开始对于SMB这名词非常的有兴趣,SMB为Server Message Block
的缩写,目的是对于机器与机器之间可以档案与列印的分享,其中它的演进有许多的版本,这次会爆发的主因是微软Windows作业系统普遍的使用这个通讯格式进行交换,但在实作驱动过程中因为设计上造成漏洞,而这漏洞又因为许多原因被有心人事取得并使用,造成漏洞为什么现在才会被修补上,连微软都破例替原本不再支援的Windows XP
制作修补程式就知道市场方面,Windows XP
还有存在的必要,在这要建议Windows使用者尽快升级至有支援系统更新维护的版本.
此篇目的要将Samba重新设定其SMB使用的版本,首先在你已经使用Samba的主机中篇辑设定档,这里使用的是nano编辑器:
nano /etc/samba/smb.conf
在[Global]
区段上新增最小支援的SMB版本
[global] : : min protocol = SMB2
修改后并储存档案,重新开启Samba服务,目前的Linux全面改用Systemd管理程式,以它为例子:
systemctl restart smbd.service
或有些Linux分支使用:
systemctl restart smb.service
如此一来你使用的Samba就改用SMB2,至于目前使用SMB各版本的Windows作业系统列表:
- CIFS – The ancient version of SMB that was part of Microsoft Windows NT 4.0 in 1996. SMB1 supersedes this version.
- SMB 1.0 (or SMB1) – The version used in Windows 2000, Windows XP, Windows Server 2003 and Windows Server 2003 R2
- SMB 2.0 (or SMB2) – The version used in Windows Vista (SP1 or later) and Windows Server 2008
- SMB 2.1 (or SMB2.1) – The version used in Windows 7 and Windows Server 2008 R2
- SMB 3.0 (or SMB3) – The version used in Windows 8 and Windows Server 2012
- SMB 3.02 (or SMB3) – The version used in Windows 8.1 and Windows Server 2012 R2
以上资讯是从微软网站所取得,传送门在此。