samba linux windows 请联系管理员

在使用Samba进行建立Window与Linux共享时,要是不能访问,出现“您可能没有权限使用网络资源”,

那就是SELinux在作怪了

要是想让共享目录能访问,可以使用命令

#setenforce 0

暂时停掉SELinux

使用

#setenforce 1

启用SELinux

有关SELinux 在系统中的作用就不讲了,另外一种方法可以不用关闭SELinux.以下命令将允许这个权限:

setsebool -P samba_enable_home_dirs=1

若SElinux啟用中,在Windows檔案總管無法連到 Samba 所分享出來的目錄時,

在Linux 中,可執行下列指令:

setsebool -P samba_enable_home_dirs on

參考文件: /etc/samba/smb.conf

#--------------- # SELINUX NOTES: # 分享群組 # If you want to use the useradd/groupadd family of binaries please run: # setsebool -P samba_domain_controller on #

# 分享home目錄 # If you want to share home directories via samba please run: # setsebool -P samba_enable_home_dirs on # # If you create a new directory you want to share you should mark it as # "samba-share_t" so that selinux will let you write into it. # Make sure not to do that on system directories as they may already have # been marked with othe SELinux labels. # # Use ls -ldZ /path to see which context a directory has # # Set labels only on directories you created! # To set a label use the following: chcon -t samba_share_t /path # # If you need to share a system created directory you can use one of the # following (read-only/read-write): # setsebool -P samba_export_all_ro on # or # setsebool -P samba_export_all_rw on # # If you want to run scripts (preexec/root prexec/print command/...) please # put them into the /var/lib/samba/scripts directory so that smbd will be # allowed to run them. # Make sure you COPY them and not MOVE them so that the right SELinux context # is applied, to check all is ok use restorecon -R -v /var/lib/samba/scripts # #-------------- #

samba linux windows 请联系管理员

时间: 2024-08-26 19:14:48

samba linux windows 请联系管理员的相关文章

linux系统-用户管理-管理员授权

linux系统-用户管理-管理员授权 一 linux的普通用户的root权限 1常用于管理某些服务的时候需要一些权限,可以在visudo里面编辑 用户名  主机地址=绝对路径(用于限定权限,使用户只能在这些路径下执行相应的程序,而不需要root权限) 2 可用于网站管理服务等,和linux系统的后门入侵 二 my_qq 872785786 及linux系统基础相应的网盘资料链接:http://pan.baidu.com/s/1ydewA 密码:kaek 欢迎一起交流学习-安卓嵌入式开发,若想免费

centos 配置 samba 与windows共享文件夹

yum install samba/etc/samba/smb.confdirectory mask = 0777 ← 指定新建目录的属性(以下4行) force directory mode = 0777 directory security mask = 0777 force directory security mode = 0777 create mask = 0777 ← 指定新建文件的属性(以下4行) force create mode = 0777 security mask =

Linux&&Windows文件同步简单配置[rsync]

1.Windows to Windows 1.1.所需软件:cwRsyncServer_4.1.0_Installer.zip 1.2.安装: 解压后,直接双击安装 此步骤为设置同步的帐户和密码,该步骤会在操作系统层面创建一个用户:SvcCWRSYNC.当然,我们也可以修改这个用户,自己设置密码,都可以. 但是Windows下面可以不设置,全部默认即可. 1.3.配置服务端 编辑文件:rsyncd.conf use chroot = false strict modes = false host

您没有权限生成需要的系统配置修改。请使用管理员权限

今天安装俊冷精简破解Camtasia,出现出现"您没有权限生成需要的系统配置修改.请使用管理员权限重新运行本安装程序." 真晕,明明是管理员的账户啊!关了杀毒软件和防火墙,再安装,还是不行. 上网上搜到这个: 1.在安装这个程序的时候,使用的是Administrators组的成员用户. 2.已经将防火墙(系统的和三方的)关闭. 3.Application Management服务已经打开. 4.HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows

Linux 与 Linux Windows 文件共享 小知识

Linux 与 Linux Windows 文件共享 前提说明:windows主机信息:192.168.1.100 帐号:abc 密码:123 共享文件夹:sharelinux主机信息:192.168.1.200 帐号:def 密码:456 共享文件夹:/home/def/share 由于暂时还不会防火墙和SELINUX配置,而下面有些方法中的操作会受到他们的限制,因此先关闭这俩.关闭防火墙的命令:service iptables stop关闭SELINUX命令:setenforce 0 一.实

使用VS Code配合Remote Development插件连接远程服务器(Mac/Linux+Windows) | Using VS Code with Remote Development Connect to Remote Server (Mac/Linux+Windows)

最新版VS Code(2019年6月)出了一系列新的插件,包括Remote Development,Remote SSH等,使得用户可以使用VS Code远程连接服务器写代码,方便了协同工作.具体配置(Mac/Linux, Windows)操作如下: 1.首先,在插件市场中搜索这些插件,安装Remote Development即可将一系列插件,包括Remote SSH等一同安装. 2.接下来需要生成ssh的key. 打开命令行,输入: ssh-keygen -t rsa -b 4096 接下来,

linux & windows porting

1. linux   int snprintf(char *restrict buf, size_t n, const char * restrict   format, ...); windows  int _snprintf( 2. 头文件都是string. h windows平台:函数:stricmp(char *str1, char *str2), strnicmp(char *str1, char *str2, size_t n).Linux平台: 函数:strcasecmp(char

Linux Windows对NTFS移动盘的写入

一块西数1G的移动盘(2.5寸),厂家格式化为NTFS格式的文件系统.    最先挂到Windows 7机器上,拷入50G的文件,主要为MKV封装的电影和对应的字幕文件.刚开始拷速度很快,大约70M/秒,但是很快就降到32M/秒左右.拷贝完成后立即拔下,移动盘烫手.    后来挂到Ubuntu(版本14.04)下,也拷贝50G的视频文件,一开始的速度就在30M/秒的样子,很稳定.拷完立即拔盘,移动盘不热,甚至都不温.    这两台机器配置有差异,Windows 7更高,并且差别很大.如果想比较速

汉澳sinox为什么没有下载源,因为sinox运行unix/linux/windows程序

有用户下载使用汉澳sinox后说sinox没有下载源. 意思是说类似linux那样能下载linux 开源程序安装. 但是你要知道,sinox并不是linux. 首先,sinox是商业操作系统,就像 windows那样,你看到 windows有下载源吗? sinox不是开源操作系统,因此也就没有开源源代码和程序下载这种说法. 其次,sinox能运行bsd/unix/linux/windows程序,要做一个下载源那么该有多大?而且主要是支持商业软件开发,除了提供一些必要下载,大部分还是让其他软件公司