zoukankan      html  css  js  c++  java
  • win10访问samba配置共享目录,踩坑记

    以前都很顺利,突然报错,看似是认证没通过,也配置也用户密码,还是不行,折腾好久,记录一下:
     
    配置过程:
     
    安装

      sudo apt-get install samba

      sudo apt-get install cifs-utils

    改配置
      sudo vim  /etc/samba/smb.conf
     
           最后添加:

      [share]
        path = /home/username/Desktop/share  #共享目录,提前建立好,chmod 777等
        valid users = test
        writable = yes
        browseable = yes

    添加smba用户
        sudo touch /etc/samba/smbpasswd
        sudo smbpasswd -a test
     
    重启samba
        sudo service smbd restart
     
    win10下访问:
      \192.168.192.129share
     
    提示错误:
          You can't access this shared folder because your organization's security policies block unauthenticated guest access.
          These policies help protect your PC from unsafe or malicious devices on the network.

    原因:

      因为Window10 更新安全策略,默认禁止访问无密码的Samba共享

    解决:

      在Samba中增加用户名密码配置, 并在配置文件smb.conf 中注释掉 map to guest = bad user 

              如:    

        # This option controls how unsuccessful authentication attempts are mapped
        # to anonymous connections
        #map to guest = bad user

    配置多个共享目录:在后面挨个加,如下:注意名称

    [share]
    path = /home/test/Desktop/share
    valid users = test
    writable = yes
    browseable = yes


    [Public]
    path = /home/test/Public
    valid users = test
    writable = yes
    browseable = yes

    win10下访问:
      \192.168.192.129Public
  • 相关阅读:
    Study Plan The TwentySecond Day
    Study Plan The Nineteenth Day
    Study Plan The TwentySeventh Day
    Study Plan The Twentieth Day
    Study Plan The TwentyFirst Day
    python实现进程的三种方式及其区别
    yum makecache
    JSONPath 表达式的使用
    oracle执行cmd的实现方法
    php daodb插入、更新与删除数据
  • 原文地址:https://www.cnblogs.com/leehm/p/13712295.html
Copyright © 2011-2022 走看看