1. Installing the Samba server
Yum Install Samba
2. Configuration
VI /etc/samba/smb.conf
Security = User (100 rows or so) under share definitions note all of the following configuration files
= == yes
3. Create a new user name, create a new folder, and set ACL permissions
# useradd-s/sbin/nologin-m You need to create a new user name
mkdir -P in configuration (2), the path of the file to be stored
Acl:
1. See if you have ACL permissions
Mount grep " ACL " grep " grep "
2. If 1 has no output then you need to add permissions
VI /etc/fstab
In the/That column after the disk format is configured to add an ACL before
Reboot required after completion (please set, do not turn on the boot Oh!!!) )
Or
Mount /o remount
3. Configuring ACLS
# setfacl-m--m-u:test1:r-x/share
4. View ACL permissions
# Getfacl need to see the directory
4.iptables Set-up
139 -445 -j ACCEPT
Note:
139 445 ports must be open
If you need to use the computer name to access, you need to open 137 138 port,
However, basically do not use, open the above two ports for IP access.
Save and restart the firewall
#/etc/init.d/iptables Save &&/etc/init.d/iptables Reload
5.SEliux settings
View Rules
grep " Samba "
Configuration
Configuration based on what is mentioned in the smb.conf configuration file
# setsebool-p Samba_create_home_dirs=on && setsebool-p Samba_domain_controller=on &
6. Test can
Time:2016-08-10 23:22:04
Name: Wang
Mail:[email protected]
Centos Samba Server iptables and SElinux settings