• 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)
  • 相关阅读:
    05 库的简单操作
    04 基本的MySQL语句
    03 MySQL安装和基本管理
    02 数据库概述
    01 MySQL入门了解
    Django-组件拾遗
    bootstrap基础讲解
    jQuery练习
    前端基础之Jquery
    15 Django组件-中间件
  • 原文地址:https://www.cnblogs.com/dezai1223/p/5206858.html
Copyright © 2020-2023  润新知