windows访问rhel7的共享,提示“您可能没有权限使用网络资源,请与这台服务器的管理员联系以查明您是否有访问权限”

       今天给一台rhel7服务器配置一个samba共享,设置结束后使用window电脑访问rhel7的共享总是提示“您可能没有权限使用网络资源,请与这台服务器的管理员联系以查明您是否有访问权限”,检查配置、检查网络都没问题啊,百思不得其解。

网上百度找了很多解决方法都没解决,偶尔看到一个人说的是否共享文件夹建在了用户目录下,检查一下果然是这个原因,记录一下免得以后忘记。

原先配置

[global]
workgroup = WORKGROUP
server string = Samba Server %v
security = user
map to guest = bad user
dns proxy = no
guest account =nobody
[229共享]
netbios name =redhat

##因为home目录空间比较大,当初就顺手建在了oracle用户下/home/oracle
path = /home/oracle/229共享
browsable =yes
writable = yes
guest ok = yes
#guest account = guest
browsable = yes
read only = no

修改后

[global]
workgroup = WORKGROUP
server string = Samba Server %v
security = user
map to guest = bad user
dns proxy = no
guest account =nobody
[229共享]
netbios name =redhat
path = /229
browsable =yes
writable = yes
guest ok = yes
#guest account = guest
browsable = yes
read only = no

修改配置后重启服务

systemctl restart smb.service
systemctl restart nmb.service

ok,可以访问了。

你可能感兴趣的:(Linux)