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 ...
随机推荐
- Tkinter教程之Checkbutton篇
本文转载自:http://blog.csdn.net/jcodeer/article/details/1811306 #Tkinter教程之Checkbutton篇#Checkbutton又称为多选按 ...
- PHP:PHP5.4连接SQLSERVER
在PHP5.4的环境下要连接SQLSERVER(2005/2008)数据库,需要以下步骤: 1.下载PHP5.4连接SQLSERVER的驱动(两个动态连接库)http://www.microsoft. ...
- Junit。。。
keep the bar green to keep the code clean.
- 并行开发——Parallel的使用 -摘自网络
随着多核时代的到来,并行开发越来越展示出它的强大威力,像我们这样的码农再也不用过多的关注底层线程的实现和手工控制, 要了解并行开发,需要先了解下两个概念:“硬件线程”和“软件线程”. 1. 硬件线程 ...
- 为Delphi程序增加UAC功能(管理员身份运行exe)
相关资料:http://bbs.csdn.net/topics/320071356# 操作方法: 在Source\VCL目录下应该有这样两个文件sample.manifest和WindowsXP.rc ...
- CodeForces 682B Alyona and Mex (排序+离散化)
Alyona and Mex 题目链接: http://acm.hust.edu.cn/vjudge/contest/121333#problem/B Description Someone gave ...
- 应用反射写的tostring方法
应用反射写的tostring方法 应用反射写的tostring方法,方便以后查询 代码 package com.chzhao.reflecttest; import java.lang.reflect ...
- Linux命令之env:显示当前用户的环境变量
Linux系统里的env命令可以显示当前用户的环境变量,还可以用来在指定环境变量下执行其他命令.下面来比较一下set,env和export命令的异同:set命令显示当前shell的变量,包括当前用户的 ...
- ASP.NET MVC程序传值方式:ViewData,ViewBag,TempData和Session
转载原地址 http://www.cnblogs.com/sunshineground/p/4350216.html 在ASP.NET MVC中,页面间Controller与View之间主要有以下几种 ...
- 开源的读取Excel文件组件-ExcelDataReader
ExcelDataReader可以读取 Microsoft Excel 文件 ('97-2007),支持Windows .Net Framework 2 +. Windows Mobile with ...