V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Jirajine
V2EX  ›  Windows

Windows Explorer 无法访问 samba 共享

  •  
  •   Jirajine · 2019-10-30 15:14:44 +08:00 · 2609 次点击
    这是一个创建于 1633 天前的主题,其中的信息可能已经有所发展或是发生改变。

    Win10 1809,服务器 samba 版本是 3.6.25 先上 smb.conf 配置:

    [global]
            netbios name = OpenWrt
            display charset = UTF-8
            interfaces = lo br-lan
            server string = OpenWrt
            unix charset = utf-8
            workgroup = WORKGROUP
            bind interfaces only = yes
            deadtime = 30
            enable core files = no
            #invalid users = root
            local master = yes
            map to guest = Bad User
            max protocol = SMB2
            min receivefile size = 16384
            null passwords = yes
            passdb backend = smbpasswd
            security = user
            smb passwd file = /etc/samba/smbpasswd
            socket options = TCP_NODELAY IPTOS_LOWDELAY
    
            # Some other performace tuning options
            # disable links and symbol links
            follow symlinks = no
            wide links = no
            # enable some read/write tuning
            use sendfile = yes
            read raw = yes
            write raw = yes
            aio read size = 16384
            aio write size = 16384
            write cache size = 262144
            max xmit = 65536
            large readwrite = yes
            getwd cache = yes
    
    [sda2]
            path = /mnt/sda2
            valid users = root
            read only = no
            guest ok = no
            create mask = 022
            directory mask = 022
            browseable = yes
            
    

    经测试其他设备可以正常连接,但 Windows 在 explorer 中输入\\{ip or hostname} 始终提示找不到主机,无论开启关闭 windows 的 smb1 功能。

    但使用命令 net use \\OpenWrt\sda2 {password} /user:root 后可以正常连接,也可以在 explorer 中正常打开和映射网络驱动器。

    目前的解决方法是把那条命令写进 bat 脚本扔 startup 里,很难受并且开机还会闪一下黑框。

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2839 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 13:35 · PVG 21:35 · LAX 06:35 · JFK 09:35
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.