CentOS7搭建SAMBA服务器实现与WIN10匿名共享文件

1、安装SAMBA

yum -y install samba samba-client samba-common


2、修改文件打开数

vi /etc/security/limits.conf
最后添加
* soft nofile 65535
* hard nofile 65535
(需重启机器)

3、配置SAMBA

cp /etc/samba/smb.conf /etc/samba/smb.conf.bak #备份
vi/etc/samba/smb.conf
修改为:
[global]
log file = /var/log/samba/log.%m
max log size = 50
security = user
map to guest = Bad User#实现无密码访问
[PyDoc]
path=/root/PythonProject
readonly=yes
browseable=yes
writable = yes
guest ok=yes

4、关闭防火墙

systemctl stop firewalld
systemctl disable firewalld

5、关闭SELinux

修改配置文件需要重启机器:
vi /etc/selinux/config
将SELINUX=enforcing 改为SELINUX=disabled
(需重启机器)

5、测试配置文件

testparm

6、启动SAMBA

systemctl restart smb #重启
systemctl enable smb #修改为开机启动
systemctl status smb #查看状态

7、在windows下输入\\192.168.49.200访问
8、解决win10无法访问共享文件夹

a、开启网络发现
b、开启SMBv1 To enable SMBv1 on the SMB client, run the following commands: sc.exe config lanmanworkstation depend
= bowser/mrxsmb10/mrxsmb20/nsi sc.exe config mrxsmb10 start= auto
c、关闭
SMBv2 and SMBv3
To disable SMBv2 and SMBv3 on the SMB client, run the following commands:
sc.exe config lanmanworkstation depend= bowser/mrxsmb10/nsi 
sc.exe config mrxsmb20 start= disabled
(需要重启win)

转载于:https://www.cnblogs.com/dezai1223/p/5206858.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值