Samba:修订间差异

来自Gea-Suan Lin's Wiki
跳到导航 跳到搜索
此页面具有访问限制。如果您看见此消息,则说明您没有权限访问此页面。
无编辑摘要
第48行: 第48行:
sudo ufw allow from 192.168.0.0/16 to any app Samba
sudo ufw allow from 192.168.0.0/16 to any app Samba
</syntaxhighlight>
</syntaxhighlight>
== 其他 ==
新版的[[Windows]]在client端會阻擋使用guest當入Samba,會需要透過gpedit修改允許:
* https://superuser.com/a/1438512


== 外部連結 ==
== 外部連結 ==

2024年3月6日 (三) 01:52的版本

Samba是一个提供SMB协定的软体。

安装

大多数的Linux套件都有提供,在Ubuntu下可以用apt安装:

sudo apt install -y samba; sudo apt clean

设定

设定会在/etc/samba/smb.conf,建议将原来档案先备份到/etc/samba/smb.conf.bak

#
[global]
    workgroup = WORKGROUP
    server string = %h server (Samba, Ubuntu)
    log file = /var/log/samba/log.%m
    max log size = 1000
    logging = file
    panic action = /usr/share/samba/panic-action %d
    server role = standalone server
    map to guest = bad user
    usershare allow guests = yes

[samba-shared]
    comment = samba-shared
    path = /srv/samba-shared
    guest ok = yes
    read only = no
    public = yes
    writable = yes

然后重新启动:

sudo service smbd restart

防火墙

使用UFW

sudo ufw allow from 192.168.0.0/16 to any app Samba

其他

新版的Windows在client端会阻挡使用guest当入Samba,会需要透过gpedit修改允许:

外部连结