Samba Server Combat

Source: Internet
Author: User
Tags character set variables linux

1.Samba Overview

Samba is a set of applications that use the SMB (Server message Block) protocol, and by supporting this Protocol, Samba allows communication between Linux servers and Windows systems, making Cross-platform exchange possible. Samba uses C/s mode, which works by allowing NetBIOS (Windows Network Neighborhood Communication Protocol) and SMB two protocols to run on the TCP/IP communication protocol, and using the NetBEUI protocol to allow Windows to browse Linux servers in My Network Places.

The Samba server includes two background applications: SMBD and NMBD. SMBD is the core of samba, primarily responsible for establishing a dialogue between the Linux Samba server and the Samba client, authenticating the user and providing access to the file and print systems; NMBD is primarily responsible for releasing NetBIOS names and browsing services that the Linux Samba server can provide, allowing Windows users to browse the resources shared by the Linux Samba server in their network Places. In addition, Samba also includes some management tools, such as Smb-client, Smbmount, Testparm, SMBPASSWD and other programs.

The Samba server can achieve the following functions: WINS and DNS services; Network browsing services; Authentication and authorization between Linux and Windows domains; Unicode character set and domain name Mapping, UNIX sharing to satisfy CIFS protocol, etc.

2. The main application of Samba

Samba's main purpose is to communicate between Windows and UNIX, the two different operating platforms.

Main applications:

Sharing files and printer services;

Provide identity certification;

Provides host name resolution (NetBIOS name) on the Windows network.

3. NetBIOS Communication Protocol

Samba is architected on the communication Protocol of NetBIOS (network Basic input/output System,netbios).

NetBIOS is a communication protocol that allows computers in the same local area network to connect to one another. Therefore, it cannot be routed across (Router/gateway).

NetBIOS over TCP/IP encapsulates the NetBIOS protocol in TCP/IP so that the NetBIOS can be transmitted across routes.

4. Samba's two processes

The samba host uses two processes to manage two different services:

SMBD: Used to process file and Print service requests.

NMBD: Used to process NetBIOS name service requests and network browsing capabilities.

When we start Samba, the host system will start 137,138,139 of these three port, and there will be tcp/udp listening service at the same time.

5. Two kinds of online modes

Two of the most common LAN online modes: Peer/peer and domain model.

Peer/peer: Independent operation between PC in LAN, suitable for small network.

Domain model: The PC in the LAN unified through the PDC host authentication (LDAP), to obtain the appropriate permissions, suitable for medium and large networks.

6. Several main configuration files of Samba (/etc/samba)

Smb.conf: The most important configuration file, divided into [global] and [Share definitions] two parts.

LMHOSTS: corresponding to the NetBIOS name and IP of this host, typically samba captures the IP of the associated computer NetBIOS name on the LAN at startup, so this profile is not typically set.

SMBPASSWD: This file does not exist by default, it is the user password corresponding table of Samba preset.

7. Several main commands of Samba

SMBPASSWD: Used to set the user's account and password for samba.

Smbclient: Used to view the sharing of other Linux hosts. You can also use it on your own samba host to see if the settings are successful.

Smbmount: Used to mount the documents and directories shared by the Samba server on its own Linux host.

Testparm: Check to see if smb.conf have errors.

8. Several common variables of smb.conf

① Client Variables

-----------------------------------------------------------------------------

%a | The client's architecture (for example, Samba,nt,win98, or unknown)

%I | IP address of the client (for example: 192.168.220.100)

%m | NetBIOS name for Client

%m | DNS name of the client

------------------------------------------------------------------------------

② User Variables

------------------------------------------------------------------------------

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.