安装samba程序

sudo apt update
sudo apt install samba

编辑配置

sudo vim /etc/samba/smb.conf

然后对应[Homes]下面进行设置

[homes]
   comment = Home Directories
   browseable = yes
   read only = no
   create mask = 0755
   directory mask = 0755
   valid users = %S

创建samba用户

sudo smbpasswd -a <user name>
sudo systemctl start smbd && systemctl start nmbd