Samba Server configuration file

Source: Internet
Author: User

Modify the configuration file, actual combat example:

One, Samba General server configuration (Profile path:/etc/samba/smb.conf)

The basic Samba server's see-through process is divided into four main steps:

(1), edit the master profile smb.conf, specify the directory to be shared, and set sharing permissions for the shared directory;

(2), specify the log file name and the storage path in the smb.conf file.

(3), set Local system permissions for the shared directory, and Samba share permissions.

(4), reload the configuration file, or restart the SMB service so that its configuration takes effect.


Second, the configuration file detailed:

    1. Introduction to Samba Configuration

      The beginning of the smb.conf file is a brief introduction to the Samba configuration, which tells us the role of the smb.conf file and related information;

      The smb.conf also begins with ";", which is a sample format for samba configuration, which is not valid by default, and can be set by removing the preceding ";" and modifying it to use the feature.

    2. Global Settings

Global settings is set to the globally variable region. The global variable means that we only have to set it at global, and that setting is for all shared resources to take effect. This is similar to many of the server configuration files that we learn later.

"Global" characters commonly used section and how to set it up:

(1). Set up the Samba server workgroup for Andy

Workgroup = Andy #工作组

(2). Server description, server description is actually similar to note information

Set Samba description information to "Andy Samba server" #服务器描述

(3). Set Shisamba server security mode. There are two common patterns: share security level mode and user security level mode.

The Samba server has five security modes, share, user, server, domain, and ad Active Directory.

(1). Share Security Level mode

Client Login Samba server, do not need to enter the user name and password to browse the resources of the Samba server, for public shared resources, poor security, need to cooperate with other permissions settings, to ensure the security of Samba server.

(2). User Security Level mode

Client Login Samba server, need to submit a legitimate account and password, after the server authentication to access the shared resources, the server default to this level mode.

3.share definitions definition of shared services

[Homes] is a special shared directory that represents the household directory.

[Printers] indicates a shared printer.


To configure a shared resource:

[Share] #设置共享名

Comment = home directories #描述

browseable = yes #是否允许查看此共享内容. If yes, you can view it later through the absolute path.

Path =/share #共享路径, write absolute path

public = yes #允许设置匿名查看


4. Setting up Access users

If the shared resource has important data, it needs to be audited for the access user, and we can use the Valid Users field to set it up.

Format:

Vaild users = user name

Vaild users = @ Group name


5. Set Directory writable

If the shared directory allows user write operations, it can be set using the writable or the Write list two fields.

writable = yes #读写

writable = no #只读

Write list = user name

Write list = @ Group name


6.samba Service log file

In the/etc/samba/smb.conf file, log file is the field that sets the Samba log.



This article is from "For Tomorrow" blog, please be sure to keep this source http://andyboge.blog.51cto.com/6809119/1870226

Samba Server configuration file

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.