创建ubuntu系统用户
adduser --home /home/username --shell /bin/bash username
创建 Samba 用户
smbpasswd -a username
修改Samba配置
vim /etc/samba/smb.conf
[yeboyun]
path = /home/username
browsable = yes
writable = yes
valid users = username
Samba重新读取配置文件
systemctl reload smbd nmbd