Build and deploy Samba services under Linux

Source: Internet
Author: User
Tags linux

Overview of Samba:

First of all, when we are learning samba, there are a lot of people who want to learn about the samba server? Samba is the link between the two operating system platforms, and the advent of Samba facilitates communication between Linux and Windows. can achieve the sharing of resources and file copies of some powerful features. Of course, we can also add the Samba server to the domain.

Samb Environment:

The Samba server enables print sharing of files, authentication and permission settings, name resolution, and browsing services.

The working principle of samba:

The Samba server implements the SMB/CIFS protocol on Linux Systems, which provides network file sharing services for Windows hosts on Linux systems, and the following two service programs are included in the Samba server. SMBD Service Program and NMBD service program. The main function of NMBD is to perform NetBIOS domain resolution and to provide a list of shared resources on the network. SMBD is primarily for managing shared directories on the Samba server, and he is targeting shared resources on the network.

Build the Samba server:

First, Samba user account and user directory settings: 1.1.1.1. Let's see if the Samba server is installed before we install it. As shown in Figure 1-1, the installation software required for the Samba server, and the following software are the software that installs the Samba server.

1.1.1.2. smb.conf user account and User directory permissions settings: In the configuration file "homes" shared directory is the Samba server default provisioning configuration, but also a more specific share location. The "homes" shared directory does not refer specifically to a directory, but rather represents the host directory of the samba user, which is the content of the host directory where the samba user can access the system with the same name. As shown in Figure 1-2:

1.1.1.3. Set up the Samba user account, the Samba server does not use the Linux system's user account to authenticate, but maintains its own user account file, the Samba server's user account file is kept in the "/etc/samba" directory, the filename is "smbpasswd ", but the initial state is not present and is automatically established when the samba user is created for the first time using the SMBPASSWD command. We need to be aware that the user account of the Samba server and the system's user account are kept in their respective databases, not in the same database. Use the "-a" option of the SMBPASSWD command to add a Samba user account to the "smbpasswd" file, which requires specifying the user name to add as an argument, and the "smbpasswd" command prompts you to set the user's password for that samba during execution. We need to establish a "Linux" System user account with the same name before creating the Samba user account.

1.1.1.4. When we create a user, the user's user account will be recorded in the smbpasswd file, and we'll check his permissions and his password, and save the user account and user password in the view smbpasswd file. So for security, we have no other permissions on the root user and the read and write permissions. When using the Sambapass command to build a Samba account, we need to pay attention to a few points: Samba account to save the user's account and encrypted password information using the account independent SMBPASSWD file The user account in the Samba server should have the same Linux system user account as the other, and the system account with the same name does not need to have a password set when the Samba user does not need to log on to the Linux system, as shown in Figure 1-4:

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.