安装samba程序

1
2
sudo apt update sudo apt install samba

编辑配置

1
sudo vim /etc/samba/smb.conf

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

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

创建samba用户

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