Samba is an open source GPL free software, which can be said to be a significant contribution of the free software community. The advent of samba completely solves the resource sharing and access between UNIX and Windows, which is more and more widely concerned with its concise, practical, flexible configuration and powerful features. And for that reason, samba services are now available to almost all Unix-like classes.
Since Samba is a bridge between Unix-like systems and windows, it is designed to let Unix-like systems join the Windows network, rather than having Windows join a UNIX-like network, so you need to understand how the Windows network works first. Windows 9x, Windows Me, and Windows NT in SMB use 137 (UDP), 138 (UDP), and 139 (TCP) ports, and 445 (TCP) ports are used in later versions of Windows 2000. The corresponding relationship between SMB and OSI 7 layer type is shown in 6-1.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/49/9A/wKioL1QWWQPBorAkAAIqF_1BeQE295.png "title=" Sam. PNG "alt=" Wkiol1qwwqpborakaaiqf_1beqe295.png "/>
Samba services mainly provide the following features.
(1) Sharing resources (directories, printers) on Unix-like systems.
(2) Use shared resources (directories, printers) on Windows.
(3) Authenticate users using Samba resources through windows.
(4) Use the WINS service for name resolution and browsing.
(5) Secure data transfer via SSL.
Samba services consist mainly of the following two processes.
(1) NMBD: Perform NetBIOS name resolution and provide a browse service to display a list of shared resources on the network.
(2) Smdb: Manage shared directories, printers, etc. on the samba server. Services that are managed primarily for shared resources on the network. When you want to access the server, to find the shared files, you rely on Smdb this process to manage the data transfer.
The Samba service and Samba client workflow are as follows.
(1) Protocol negotiation: When the client accesses the Samba server, it sends a NEGPROT command packet informing the target computer of the type of SMB it supports. The samba server chooses the optimal SMB type and responds based on the client situation.
(2) Establish a connection: when the SMB type is confirmed, the client sends the session Setup command packet, submits the account number, the password, and requests a connection to the Samba server. If the client is authenticated, the Samba server responds to the session setup message and assigns the user a unique UID to communicate with the client.
(3) Access to shared resources: When a client accesses a Samba shared resource, it sends a Tree Connect command packet, notifies the server of the shared resource name that it needs to access, and if set allows, the Samba server assigns a TID to each customer's connection to the shared resource. Clients can access the shared resources they need.
(4) Disconnect: Sharing is complete, the client sends a tree disconnect message to the server to turn off sharing.
Reference: http://book.51cto.com/art/201108/282395.htm
This article is from the "--" blog, please be sure to keep this source http://57388.blog.51cto.com/47388/1552774
Linux--Samba overview