A trick that is not always connected to the samba configuration in CentOS

Source: Internet
Author: User

Grandma's, according to the method of the net changed the/etc/samba/smb.conf configuration file, the result in Win7 inside dead and alive not even, later discovered is a firewall problem.

There are two commands that must be executed:

1. set Seliunx to Disabled or permissive

Setenforce 0

2. shut down the Firewall service

Service Iptables Stop



If SELinux is in use, the Windows file does not connect to the records that Samba shares,

In Linux, you can perform the following commands:

Setsebool-p Samba_enable_home_dirs on

Document:/etc/samba/smb.conf

#---------------
# SELINUX NOTES:
# Share Groups
# If you want to use the Useradd/groupadd family of binaries Pleaserun:
# Setsebool-p Samba_domain_controller on
#

# Share Home Catalogue
# If you want to share home directories via Samba-please run:
#setsebool-p Samba_enable_home_dirs on
#
# If You create a new directory your want to share you should Markit as
# "samba-share_t" so that SELinux would let you write into it.
# Make sure don't to do, on system directories as they mayalready has
# been marked with othe SELinux labels.
#
# use Ls-ldz/path to see which context a directory have
#
# Set Labels 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 canuse 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/rootprexec/print command/...)
# put them into the/var/lib/samba/scripts directory so that's Smbdwill be
# allowed to run them.
# Make sure COPY them and don't MOVE them so that the rightselinux context
# is applied, to check all are OK use restorecon-r-v/var/lib/samba/scripts
#
#--------------
#



iptables boot: chkconfig iptables on off: Chkconfig iptables offiptables shutdown: On: Service iptables start off: Service IPT Ables Stop



Chkconfig--level NMB on

Chkconfig--level SMB on

A trick that is not always connected to the samba configuration in CentOS

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.