命令:
sudo apt-get install samba
sudo vi /etc/samba/smb.conf
配置文件末尾加上:
[share]
comment = samba #说明 没有意义
browseable = yes
path = /home/wwwroot/
create mask = 0777
directory mask = 0777
valid users = www #用户,登陆用
force user = root
force group = root
public = yes
writable = yes
available = yes
命令:
sudo /etc/init.d restart
添加samba用户
sudo smbpasswd -a www
sudo smbpasswd -e www
打开windows运行输入\192.169.0.120\share\
输入用户名和密码