参考:https://linux265.com/news/3597.html#list6
1、安装服务器:
apt-get install samba
2、创建共享文件夹
3、配置服务器
vim /etc/samba/smb.conf
[source]
comment=Users Profiles
path = /home/www/source
guest ok = yes
browseable = yes
available = yes
create mask = 0755
writable = yes
read only = no
force user = root
force user = root
4、关闭防火墙
ufw disable
ufw enable
ufw status
5、创建用户
sudo smbpasswd -a www
激活用户
smbpasswd -e www
重启Samba服务
5、启动服务器
ubuntu 16.04 : sudo service smbd restart
systemctl restart smbd
netstat -tunlpa |grep smbd
6、ubuntu mount自测
sudo mkdir -p /mnt/share
sudo mount -t cifs -o username=www,password=qwer1234 //192.168.111.51/www /mnt/share
7、本地电脑无法访问ubuntu是因为组织的安全策略阻止未经身份验证的来宾访问”
https://zhidao.baidu.com/question/1116524242273105979.htm