1. 安装samba服务
sudo apt-get install samba
sudo apt-get install smbclient
2. 启动Samba服务
sudo /etc/init.d/smbd start
3. 配置smb.conf文件
[global] 部分内容如下
workgroup = WORKGROUP
server string = Samba Server Version %u
security = user
passdb backend = tdbsam
load printers = yes
cups options = raw
还需要加入:
[myshare]
comment = share for users
path = /samba
browseable = yes
writable = yes
public = no
4. 创建文件夹
mkdir /samba
5. 设置用户密码
sudo smbpasswd -a username
设置新的密码
6. 重启Samba服务
sudo /etc/init.d/smbd restart