centos中samba配置后始终连不上的绝招

来源:本站
导读:目前正在解读《centos中samba配置后始终连不上的绝招》的相关信息,《centos中samba配置后始终连不上的绝招》是由用户自行发布的知识型内容!下面请观看由(电工技术网 - www.9ddd.net)用户发布《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

#

#--------------

#

iptables开机自动启动:

开启: chkconfig iptables on

关闭: chkconfig iptables off

iptables关闭服务:

开启: service iptables start

关闭: service iptables stop

chkconfig --level 35 nmb on

chkconfig --level 35 smb on

提醒:《centos中samba配置后始终连不上的绝招》最后刷新时间 2024-03-14 01:04:01,本站为公益型个人网站,仅供个人学习和记录信息,不进行任何商业性质的盈利。如果内容、图片资源失效或内容涉及侵权,请反馈至,我们会及时处理。本站只保证内容的可读性,无法保证真实性,《centos中samba配置后始终连不上的绝招》该内容的真实性请自行鉴别。