Simple Samba configuration based on user authentication
1. Introduction to samba
Samba is a free software that implements the SMB protocol on Linux and UNIX systems. It consists of servers and client programs.
Server Messages Block (SMB) is a communication protocol used to share files and printers on a LAN, it provides sharing services for files, printers, and other resources between different computers in the LAN.
The SMB protocol is a client/server protocol that allows a client to access shared file systems, printers, and other resources on the server. By setting "NetBIOS over TCP/IP", Samba can not only share resources with local network hosts, but also share resources with computers around the world.
2. samba Installation
2.1 install yum Source
Yum-y install samba-client
2.2 Configuration
2.2.1 add Authenticated Users
Useradd user1
Smbpasswd-a user1
2.2.2. Create a configuration folder
Mkdir/home/files
2.2.3. User File Permission Configuration
Setfacl-m u: user1: rwx/home/files/
2.2.4 modify the configuration file (Add at the end)
Vim edit/etc/samba/smb. conf
[Files]
Path =/home/files
Valid users = user1, @ gp1
Write list = user2
2.2.5. Start and configure automatic Service Startup
/Etc/init. d/smb start
Chkconfig smb on
2.2.6 temporarily disable selinux
Setenforce 0
2.2.7 permanently disable selinux
Cat/etc/selinux/config
Sed-I's/SELINUX = enforcing/SELINUX = disabled/G'/etc/selinux/config
Cat/etc/selinux/config
2.2.8. configure the firewall
Vim edit/etc/sysconfig/iptables
-A input-m state -- state NEW-m tcp-p tcp -- dport 139-j ACCEPT
-A input-m state -- state NEW-m tcp-p tcp -- dport 445-j ACCEPT
2.2.9. Restart the Firewall
/Etc/init. d/iptables restart
------------------------------------ Split line ------------------------------------
How to share files with Samba in Ubuntu 14.04
The speed of accessing samba from Ubuntu dual Nic of VMWare Virtual Machine doubles
Add the Samba File Sharing Server to the Windows Server 2003 Domain
Samba installation Configuration
Install Samba in Ubuntu 15.04
Samba service configuration in CentOS 6.2
Samba Server installation and configuration
Deploy Samba enterprise file sharing service in CentOS
------------------------------------ Split line ------------------------------------
Samba details: click here
Samba: click here
This article permanently updates the link address: