zoukankan      html  css  js  c++  java
  • 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)
  • 相关阅读:
    easyui 例子2
    easyui 1
    SqlHelper.cs
    ajax 视频点赞功能
    路线
    .net面试题
    cookie 和session asp.net
    前端面试2
    前端面试1
    bootstrap 初始学习篇
  • 原文地址:https://www.cnblogs.com/dezai1223/p/5206858.html
Copyright © 2011-2022 走看看