WINDOWS访问SAMBA提示没有权限 您所在的位置:网站首页 共享文件打开提示没有权限 WINDOWS访问SAMBA提示没有权限

WINDOWS访问SAMBA提示没有权限

2024-07-12 01:21| 来源: 网络整理| 查看: 265

1.使用rpm -qa|grep samba 查看是否安装samba

 

samba-winbind-clients-3.5.4-68.el6.x86_64

samba-3.5.4-68.el6.x86_64

samba-client-3.5.4-68.el6.x86_64

samba-common-3.5.4-68.el6.x86_64

已安装

2.更改/etc/samba/smb.conf配置

 

C代码 [global]      dos charset = cp936      display charset = UTF-8      workgroup = MYGROUP      server string = Samba Server Version %v      log file = /var/log/samba/log.%m      max log size = 50      cups options = raw    [homes]      comment = Home Directories      read only = No      browseable = No    [printers]      comment = All Printers      path = /var/spool/samba      printable = Yes      browseable = No    [tools]      comment = tools      path = /tools      read only = No      guest ok = Yes    [home]      comment = User Directory      path = /home/%U      read only = No  [global] dos charset = cp936 display charset = UTF-8 workgroup = MYGROUP server string = Samba Server Version %v log file = /var/log/samba/log.%m max log size = 50 cups options = raw [homes] comment = Home Directories read only = No browseable = No [printers] comment = All Printers path = /var/spool/samba printable = Yes browseable = No [tools] comment = tools path = /tools read only = No guest ok = Yes [home] comment = User Directory path = /home/%U read only = No

添加smb访问用户smbpasswd -a root

 

3.重启service smb restart

4.如果windows下登录samba服务器后无法访问linux下共享目录,提示没有权限。

则检查

 

a、确保linux下防火墙关闭或者是开放共享目录权限

 

b、确保samba服务器配置文件smb.conf设置没有问题,可网上查阅资料看配置办法  

c、确保setlinux关闭,可以用setenforce 0命令执行。 默认的,SELinux禁止网络上对Samba服务器上的共享目录进行写操作,即使你在smb.conf中允许了这项操作。       /usr/bin/setenforce 修改SELinux的实时运行模式  

setenforce 1 设置SELinux 成为enforcing模式

setenforce 0 设置SELinux 成为permissive模式  

如果要彻底禁用SELinux 需要在/etc/sysconfig/selinux中设置参数selinux=0 ,或者在/etc/grub.conf中添加这个参数

  /usr/bin/setstatus -v  



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有