Build Samba in CentOS7.2

Source: Internet
Author: User

Build Samba in CentOS7.2

Build a simple Samba tutorial under CentOS7.2.

1. Download the samba source code and upload it to CentOS
Take samba-4.2.2 as an Example
2. Unzip to the current folder tar xvf samba-4.2.2.tar.gz
3. Compile and install the SDK by default.
Cd samba-4.2.2
./Configure
Make
Make install
4. Configure smb. conf
Install the default directory in/usr/local/samba
Cp/etc/samba/smb. conf/usr/local/samba/etc/
Vim/usr/local/samba/etc/smb. conf

Sample configuration: Change the [homes] segment
[Root]
Comment = Home Directories
Path =/root
Public = yes
Browseable = no
Writable = yes
Create mask = 0777
Sync always = yes
; Valid users = % S
; Valid users = MYDOMAIN \ % S

5. Run smb
/Usr/local/samba/sbin/smbd-D
/Usr/local/samba/sbin/nmbd-D
You can use ps-ef | grep * mbd to check whether the startup is normal. Otherwise, the configuration file is incorrect.

6. Add users
Example:/usr/local/samba/bin/smbpasswd-a root
Enter the password.

7. Set firewall firewalld and selinux
One way is to disable the firewall.
Systemctl stop firewalld. service
Setenforce 0
The second method is to add rules.
Firewall-cmd -- permanent -- zone = public -- add-service = samba
Firewall-cmd -- reload

View SELinux status:
1./usr/sbin/sestatus-v # If The SELinux status parameter is enabled, it is enabled.
SELinux status: enabled
2. getenforce # You can also use this command to check

Disable SELinux:
1. temporarily shut down (no need to restart the machine ):
Setenforce 0 # Set SELinux to permissive Mode
# Setenforce 1 Set SELinux to enforcing Mode
2. to modify the configuration file, restart the machine:
Modify the/etc/selinux/config file
Change SELINUX = enforcing to SELINUX = disabled

8. Verify and use samba
Enter \ $ ip \ root in windows win + r, and prompt to enter the user password, and then use it normally,
If any problem occurs, check whether the previous steps are correct.

It can also be mapped to a network hard disk.

------------------------------------ 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

Samba service configuration in CentOS 6.2

Samba Server installation and configuration

How to Build the Win7 + VMware + Fedora18 Samba Server

------------------------------------ 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.