Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
LxnChan
V2EX  ›  Linux

samba 共享问题

  •  
  •   LxnChan ·
    lxnchan · Jan 2, 2022 · 2655 views
    This topic created in 1584 days ago, the information mentioned may be changed or developed.

    smb.conf里面设置了文件夹可访问的用户,但是本机Windows上可以匿名访问,另外一台Ubuntu主机却不能。

    配置文件如下

    [global]
       workgroup = WORKGROUP
       server string = ust
       log file = /home/userme/logs/log.%m
       max log size = 1000
       logging = file
       panic action = /usr/share/samba/panic-action %d
       server role = standalone server
       obey pam restrictions = yes
       unix password sync = yes
       passwd program = /usr/bin/passwd %u
       passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
       pam password change = yes
       map to guest = bad user
       security = user
       usershare allow guests = no
    
    [userdisk777]
       comment = userdisk0
       path = /home/userme/userdisk0
       public = no
       read only = yes
       valid users = userme
       write list = userme
       ;invalid users = user1 user2
       create mask = 0777
       directory mask = 0777
    

    有大神能看出来是哪里出了问题吗

    Supplement 1  ·  Jun 20, 2022
    6 replies    2022-01-03 09:12:25 +08:00
    huntagain2008
        1
    huntagain2008  
       Jan 2, 2022 via iPhone
    本人小白,可以试试 testparm smb.conf 看看实际配置是否正确。
    weqopy
        2
    weqopy  
       Jan 2, 2022
    先开一下限制测试,public valid 这些,防火墙关一下,慢慢搞
    我之前是 linux 配置,Windows 访问,搞了挺长时间
    LxnChan
        3
    LxnChan  
    OP
       Jan 2, 2022
    @huntagain2008 配置文件没问题,`testparm`是没问题的
    LxnChan
        4
    LxnChan  
    OP
       Jan 2, 2022
    @weqopy Emmm...现在是 Windows 里面可以匿名访问,但是按照配置文件应该是不允许匿名的
    nbweb
        5
    nbweb  
       Jan 3, 2022   ❤️ 1
    [global]
    workgroup = WORKGROUP
    server string = Samba Server %v
    netbios name = debian
    security = user
    map to guest = bad user
    guest account = nobody
    dns proxy = no
    create mask = 0777
    directory mask = 0777
    force create mode = 0777
    force directory mode = 0777

    [Public]
    path = /mnt/Public
    browseable = yes
    public = yes
    available = yes
    oplocks = yes
    map archive = no
    guest ok = yes
    writable = yes

    这是我 debian 里面的,参考一下。
    LxnChan
        6
    LxnChan  
    OP
       Jan 3, 2022
    @nbweb 好的,谢谢。我看一下
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3131 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 00:37 · PVG 08:37 · LAX 17:37 · JFK 20:37
    ♥ Do have faith in what you're doing.