sudo apt-get install samba smbfs
sudo smbpasswd -a username
sudo vi /etc/samba/smb.conf

在后面添加如下
[workopt]
path = /opt/goke/
valid users = goke
read only = no
create mask = 0777
directory mask = 0777
sudo service smbd restart
如果有出现访问不了,查看/var/log/samba/目录下的日志文件,搜索Bad talloc magic value 这类字符,可以通过sudo apt-get install libtalloc2重新安装后解决