Simple Samba configuration based on user authentication

Source: Internet
Author: User

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:

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.