给samba用户 laboratory 设置共享文件夹:
首先,在/etc/samba/smb.conf 文件的最后添加如下内容:
[laboratory]
workgroup = laboratory
security = laboratory
netbios name = laboratory
comment = laboratory home
path = /home/laboratory #需要共享的文件夹
browsable = yes
writeable = yes
read only = no
write list = laboratory #只有laboratory有写入权限
然后,添加新的samba用户laboratory并设置samba用户的密码
smbpasswd -a laboratory
最后,重启samba服务
sudo systemctl restart smbd.service