1、安装SAMBA服务
sudo apt-get install samba samba-common
2、配置需要共享的目录
改变需要共享目录的权限,让其他人可以更改文件和目录,以/home为例(若多人使用同一服务器建议在每个用户家目录单独共享,不建议共享整个home目录,防止误操作删除他人文件)
$ sudo chmod 777 /data/ -R
3、配置SAMBA用户
# vim /etc/samba/smb.conf
[sambashare]
comment = Samba on Ubuntu
path = /data
read only = no
public=yes
writable = yes
available = yes
browseable = yes
security=share
4、重启samba
sudo /etc/init.d/samba restart
或者service smbd restart
5、通过window访问即可