centos中samba配置后始终连不上的绝招
奶奶的,按照网上的办法改了/etc/samba/smb.conf配置文件,结果在win7里面死活连不上,后来发现是防火墙的问题。
有两个命令必须要执行:
1、将SELIUNX设置成disabled或者permissive
setenforce 0
2、关闭防火墙服务
service iptables stop
若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
#
#--------------
#
chkconfig --level 35 nmb on
chkconfig --level 35 smb on
centos中samba配置后始终连不上的绝招的更多相关文章
- Centos中如何配置Texlive2013中文字体的问题
Centos中如何配置Texlive2013中文字体的问题: 第一步是下载你需要的字体,我从windows/fonts中拷贝的比较多,你只要复制你需要的字体即可. 注意只要文件扩展名为ttf的文件,t ...
- CentOS中安装配置Nginx
一.安装Nginx '首先我们需要在nginx官网中下载nginx安装包,在这就下载最新版 nginx-1.13.7版本 下载完成以后我们进入下载页面进行查看 下载文件目录为 home/userNam ...
- f-stack中nginx配置后make出现error: ignoring return value of ‘ftruncate’
问题 Nginx 配置后 make 出现error: src/os/unix/ngx_process_cycle.c: In function 'ngx_start_worker_processes' ...
- CentOs中iptables配置允许mysql远程访问
在CentOS系统中防火墙默认是阻止3306端口的,我们要是想访问mysql数据库,我们需要这个端口,命令如下: 1 /sbin/iptables -I INPUT -p tcp --dport 30 ...
- CentOS中TFTP配置
转载:http://www.centoscn.com/image-text/config/2013/1105/2062.html TFTP是用来下载远程文件的最简单网络协议,它其于UDP协议而实现 1 ...
- centos中安装配置nginx完成之后主机无法访问
原因 VMware中安装centos7,安装配置完成nginx后,主机无法访问.虚拟机没有放行Nginx默认端口80. 解决办法 首先:开启 web 端口 firewall-cmd --permane ...
- 一起了解下Centos中‘vim配置’有多强大?
在linux的系统上安装vim编辑器后,发现vim的页面设置还是不太习惯,没有显示的行号,也没有自动的缩进,页面的背景也不是很好看,但是vim编辑器是可以进行配置的,我们可以打造属于自己的vim风格. ...
- CentOS下samba配置心得(smb和nmb都要启动)
印象中以前多次配置成功过,重新配置就把以前的资料找出来: yum安装 samba samba-client samba-swat,然后配置参见:http://www.cnblogs.com/mchin ...
- CentOS 7 samba 配置
1.安装samba sudo yum install samba 2.环境配置 a.关闭防火墙 sudo systemctl stop firewalld.service #停止firewallsud ...
随机推荐
- UML统一建模语言
概述 统一建模语言(UML)是一种图形化的语言,用于软件密集系统要素的可视化.制定规范.构建对象和编写文档.UML提供了一种标准的方式来描述系统的设计图,既包括概念方面,例如业务过程和系统功能,也包括 ...
- python中yield用法
在介绍yield前有必要先说明下Python中的迭代器(iterator)和生成器(constructor). 一.迭代器(iterator) 在Python中,for循环可以用于Python中的任何 ...
- vmware ubuntu14.04虚拟机不能正常拷贝文件到windows且不能自适应虚拟机屏幕窗口自动变化的解决办法
纠结于这个问题了半天.一直重复安装不同版本的vmare-tools, 一直没有任何效果.进入到/usr/bin/ 目录使用ll vm* 查看,发现和别的不同的是没有vmware-toolbox-cmd ...
- 自定义实现InputFormat、OutputFormat、输出到多个文件目录中去、hadoop1.x api写单词计数的例子、运行时接收命令行参数,代码例子
一:自定义实现InputFormat *数据源来自于内存 *1.InputFormat是用于处理各种数据源的,下面是实现InputFormat,数据源是来自于内存. *1.1 在程序的job.setI ...
- 配置Tomcat以指定的身份(非root)运行
本文依赖的环境: CentOS(大部分内容适用于其他Linux发行版) 已安装并配置好JVM环境 已安装并配置好gcc.make等编译工具 1. 下载Tomcat安装包并解压缩 cd /optwget ...
- oracle中in与exists的区别
exists是用来判断是否存在的,当exists中的查询存在结果时则返回真,否则返回假.not exists则相反. exists做为where 条件时,是先对where 前的主查询询进行查询,然后用 ...
- HDU 5787 K-wolf Number (数位DP)
K-wolf Number 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5787 Description Alice thinks an integ ...
- codeforces Ebony and Ivory(水题)
A. Ebony and Ivory time limit per test 2 seconds memory limit per test 256 megabytes input standard ...
- 使用truss、strace或ltrace诊断软件的“疑难杂症”
简介 进程无法启动,软件运行速度突然变慢,程序的"Segment Fault"等等都是让每个Unix系统用户头痛的问题,本文通过三个实际案例演示如何使用truss.strace和l ...
- POJ 3259 Wormholes(SPFA判负环)
题目链接:http://poj.org/problem?id=3259 题目大意是给你n个点,m条双向边,w条负权单向边.问你是否有负环(虫洞). 这个就是spfa判负环的模版题,中间的cnt数组就是 ...