linux通用教程,这里以armbian为例:
安装前建议先
apt update
安装 Samba
apt -y install samba
命令编辑(此处armbian用了nano) /etc/samba/smb.conf,修改为一下内容(注意替换路径及删除注释):
PS:配置无需账户、密码。
[global]
workgroup = WORKGROUP
server string = Samba Server %v
netbios name = share
security = user
map to guest = bad user
dns proxy = no
[share]
comment = share
path = /mnt/yiii //共享路径
public = yes
writable = yes
browseable=yes
available=yes
guest ok=yes
给读写权限(与上面路径相同):
chmod 777 /mnt/yiii
启动、开机自启:
systemctl start smbd
systemctl enable smbd
如果遇到连不上的错误
打开注册表,定位到路径
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation
选择 Parameters,将 AllowInsecureGuestAuth 设为 1 。
官方公众号
全部评论