第一部分:. Linux的配置如下:
(1) smb.conf文件配置
[global]
workgroup = WORKGROUP
netbios name = xuxzsamba
security = user
server string = %h server (Samba, Ubuntu)
wins support = yes
dns proxy = yes
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
server role = standalone server
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
map to guest = bad user
usershare allow guests = yes
[homes]
comment = Home Directories
browseable = yes
read only = no
writable = yes
create mask = 0755
directory mask = 0755
valid users = %S
(2)进行了samba用户添加,/home/用户权限更改
smb -a xuxz 添加了/home/xuxz已经存在的用户
chmod 755 /home/xuxz
(3)进行了testparm测试,命令及过程如下
xuxz@xuxz-VirtualBox:/home$ testparm
Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
[global]
netbios name = XUXZSAMBA
server string = %h server (Samba, Ubuntu)
server role = standalone server
map to guest = Bad User
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
unix password sync = Yes
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
wins support = Yes
usershare allow guests = Yes
panic action = /usr/share/samba/panic-action %d
idmap config * : backend = tdb
[homes]
comment = Home Directories
valid users = %S
read only = No
create mask = 0755
(4)确认防火墙ufw,iptables已经关闭
--确认ufw状态inactive
--iptables -L规则为空
--SELinux状态无法查看(因为没有sestatus命令)
--netstat查看smbd,nmbd确认相关端口处于Listening状态
虚拟机中的unbuntu(192.168.56.101)可以ping通windows10机器(192.168.56.1)
第二部分:
windows10(专业版)
1. windows10用户名称relativezero(本地账户,管理员)
疑问的地方是:windows10没找到本地用户,用户组功能(谁告诉我咋找出来?)
2. windows10本地安全策略窗口->本地策略->安全选项->网络安全: LAN管理器身份验证级别“ 修改成了”发送LM和NTLM-如果已协商,则使用NTLMv2会话安全&“
3. 确认windows10的TCP/IP NetBIOS Helper已经开启
4. 防火墙入站规则,文件和打印机共享(SMB-In)作用域加入了虚拟网卡的子网192.168.56.0/24
5. windows10(192.168.56.1)去ping 虚拟机中的ubuntu(192.168.56.101)是通的。
第三部分:Win10搜索SAMBA,遇到了问题
(1)网络邻居中可以搜索出来虚拟机的samba服务器的名字:XUXZSAMBA
(2)双击XUXZSAMBA,可以看到homes目录
(3)双击homes目录,提示错误如下:
Windows无法访问\\XUXZSAMBA\homes
请检查名称的拼写。否则,网络可能有问题。要尝试识别并解决网络问题,请单机”诊断“。
错误代码:0x80070035
找不到网络路径
点击【诊断】,提示信息如下:
验证键入的"homes”是否正确,然后重试
Windows找不到"\\XUXZSAMBA\homes“。可能是名称拼写错误。
有没有哪个大神能分析出问题原因啊?
因为我在win7的virtual中装了centos7,通过前面的步骤,win7是可以访问虚拟机中centos7的samba服务的,但是win10 + ubuntu15.04的组合,就出现了错误。
求大神指点!!!
