How to Build Samba server under CentOS

Source: Internet
Author: User
Tags centos sublime editor

Preface
When we need to edit files on the linux server and do not want to log on to the server and use vi for editing, the Samba server is a good tool! The Samba server allows you to create a network ing on windows, and then you can use the sublime editor under wins to edit the changes. The changes will be synchronized to the remote server.

 



  1. Install the Samba service
    Use yum source to install: # yum install samba-client samba-swat
    The dependent packages samba-common, samba-winbind-clients, and libsmbclient are automatically installed.

    View the installation status:

    After the Samba server is installed, the configuration file directory/etc/samba and other samba executable command tools,/etc/samba/smb will be generated. conf is the core configuration file of samba,/etc/init. d/smb is the startup/close file of samba.

 



  1. Start Samba Server

    View samba service startup status

    Set auto-start
    # Chkconfig -- level 35 smb on // automatically runs the samba service at levels 3 and 5


  2. Configure the Samba service
    The main configuration file of Samba is/etc/samba/smb. conf.

    The master configuration file consists of two parts:
    Global Settings (55-245 rows)
    This setting is related to the overall running environment of the Samba service. Its setting items are for all shared resources.
    Share Definitions (246-tail row)
    This setting is specific to the shared directory and only applies to the current shared resources. (For more information about configuration, see the reference link)


  3. Before using the samba service, you must add existing users to the system to set the samba logon password:
    # Sambasswd-a username

    Now, you can set the samba configuration to specify the corresponding directory for the User:

    This is the samba configuration on my development machine,
    The public configuration item is to configure the public shared directory. The ower and group directories in the specified path must be set to nobody to indicate that they do not belong to a user.
    [Username] The configuration item is to set the corresponding directory for the user.
    After the setting, restart the samba server to take effect. Try connecting to windows:



    Now the samba server can be used.
Related Article

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.