linux设置共享文件夹 - samba
安装samba
sudo apt-get install samba
配置
-
/etc/samba/smb.conf 的global模块添加security = user
-
最下加入
[share]
path = /home/sharebrowseable = yes
writable = yes
available = yes
admin users = agent
valid users = agent
public = yes
重启
sudo service smbd restart
添加smba用户
sudo smbpasswd -a agent
结束
[备注]
agent用户必须提前添加到系统