1. Install Samba
Yum Install Samba samba-client Samba-common
2. Change the number of open files
vi /etc/security/limits.conf Last added 6553565535
(Restart machine required)
3. Configuring Samba
CP /etc/samba/smb.conf/etc/samba/smb.conf.bak #备份 vi/etc/samba/File = /var/log/samba/log.%=Bad user# implements no password access [Pydoc]path=/root/ Pythonprojectreadonly=yesbrowseable== yesguest OK=yes
4. Turn off the firewall
Systemctl Stop Firewalldsystemctl Disable FIREWALLD
5. Turn off SELinux
Modifying the configuration file requires restarting the machine: vi /etc/selinux/config change selinux =enforcing toselinux=disabled (restart machine required)
5. Test configuration file
Testparm
6. Start Samba
Systemctl Restart SMB #重启systemctl enable SMB #修改为开机启动systemctl status SMB #查看状态
7. Enter \\192.168.49.200 access under Windows
8. Resolve WIN10 cannot access the shared folder
A, turn on network Discovery B, open smbv1to enable SMBV1 on the SMB client, run the following Commands:sc.exe config LanmanWorkstation depend< /c0>= bowser/mrxsmb10/mrxsmb20/Nsi sc.exe config mrxsmb10 start= Autoc, open smbv1to enable SMBv2 and SMBv3 on th E SMB client, run the following Commands:sc.exe config lanmanworkstation depend= bowser/mrxsmb10/mrxsmb20/NSI SC . exe config MRXSMB20 start= auto
CentOS7 build Samba server to share files anonymously with WIN10