2. sudo vi /etc/samba/smb.conf
添加如下
[share]
comment = share folder
browseable = yes
path = /home
create mask = 0777
directory mask = 0777
valid users = a411
force user = nobody
force group = nogroup
public = yes
available = yes
3. sudo smbpasswd -a a411
出现Failed to add entry for user a411错误,是因为没有用户,首先添加用户,如果是已经存在的用户不会出现这个问题
4. systemctl restart smbd
systemctl restart nmbd