Samba Server   «Prev  Next»

Lesson 2Understanding Samba
ObjectiveDescribe Samba and Server Message Blocks.

Understanding Samba

Microsoft developed its first file-sharing protocol, the Server Message Block (SMB), to enable network file and print services for all of Microsoft's operating systems. This protocol is sometimes referred to as LanManager or NetBIOS[1]. After being reworked so it could be encapsulated in the more popular TCP/IP, it was renamed the Common Internet File System (CIFS). Samba is a collection of programs that implements SMB on Linux. Although the Samba suite consists of numerous programs, Samba's two primary components are smbd and nmbd.

Samba and Server Message Block (SMB) in the Context of Red Hat Linux

Samba is an open-source software suite that allows for file and print services to be shared across a network between different operating systems, such as Linux/Unix and Windows. It uses the Server Message Block (SMB) protocol, which is a network file sharing protocol. Within the context of Red Hat Linux, Samba plays a critical role in enabling interoperability between Linux and Windows systems, particularly in environments where file and printer sharing across these platforms is necessary.
  1. Samba Overview:
    • Purpose: Samba provides a way for Linux systems to communicate with Windows-based clients and servers by implementing the SMB protocol. It allows Linux systems to act as file and print servers for Windows clients, enabling seamless file and printer sharing across heterogeneous networks.
    • Components: Samba consists of several components, the most notable being `smbd` (which provides file and printer sharing) and `nmbd` (which handles NetBIOS name resolution and browsing).
    • Red Hat Integration: Samba is fully integrated into Red Hat Enterprise Linux (RHEL) and can be installed and managed using the `dnf` package manager. Red Hat provides robust support for configuring and managing Samba through configuration files and tools like `samba-tool` and `system-config-samba`.
  2. Server Message Block (SMB):
    • Protocol: SMB is a network protocol that enables shared access to files, printers, and serial ports within a network. Originally developed by IBM, it was later adopted and enhanced by Microsoft, becoming the foundation for Windows file and printer sharing.
    • Versions: SMB has evolved over time, with several versions, including SMB 1.0, SMB 2.0, and SMB 3.0. Each version has introduced improvements in security, performance, and functionality.
    • Use in Samba: Samba implements SMB to allow Red Hat Linux servers to share resources with Windows clients. This implementation makes it possible for Linux and Windows systems to coexist in the same network environment and share files and printers seamlessly.
  3. Key Features of Samba in Red Hat Linux:
    • File and Printer Sharing: Samba allows Linux servers to share directories and printers with Windows clients, making it easy to set up cross-platform file sharing.
    • Authentication and Security: Samba supports several authentication methods, including NTLM and Kerberos, allowing for secure access to shared resources.
    • Flexibility: Samba can be configured to serve different roles, from a simple standalone file server to a fully integrated part of a Windows domain.
    • Tools and Configuration: Red Hat Linux provides tools like `samba-tool` for managing Samba services and `/etc/samba/smb.conf` as the main configuration file for defining shares, users, permissions, and other settings.
  4. Practical Use Cases:
    • Cross-Platform File Sharing: A Red Hat Linux server running Samba can host shared directories that are accessible by both Linux and Windows clients.
    • Printer Sharing: Samba allows printers connected to a Linux server to be shared and used by Windows clients, and vice versa.
    • Integration with Active Directory: Samba can join a Windows domain, allowing Linux systems to access resources controlled by a Windows Active Directory, and Windows systems to access Linux-shared resources securely.

Summary: In a Red Hat Linux environment, Samba is a powerful tool for enabling interoperability between Linux and Windows systems. By leveraging the SMB protocol, Samba allows Red Hat Linux servers to share files and printers with Windows clients, making it an essential component in mixed-OS network environments.


smbd: Samba Server Message Block Daemon

smbd is the Samba Server Message Block Daemon, which provides all network file and print services to Windows operating systems. The /etc/smb.conf file describes the services smbd provides, and it must be configured appropriately for your network. SMB clients request services through NetBIOS. The nmbd program picks up these requests and instructs the clients to use smbd's services. nmbd provides other features, such as Microsoft Windows's Network Neighborhood and Microsoft WINS databases, to SMB clients. Roll your mouse over the elements in the GUI to see a description of each feature. Windows Internet Name Server (WINS): A Microsoft Windows NT component, a WINS server can dynamically update hostnames to IP addresses without requiring manual intervention from the system administrator.
SMB Client
Server Message Block (SMB)
  1. smbd provides printer services to SMB clients
  2. smbd provides filesystem acces to SMB clients
  3. The smbd daemon provides file and printer services to SMB clients
  4. The nmbd daemon provides NetBIOS name resolution to SMB clients

Red Hat Reference

SMB/Samba

The Server Message Block (SMB) is the most common file sharing protocol as it ships with every single copy of Microsoft Windows. SMB is also found in PDAs running Windows CE. SMB can be traced back to the old days of DOS. IBM used SMB to communicate with the original network cards. IBM moved SMB to token ring and then to Ethernet. SMB was adopted by several vendors and moved on to other protocols. Up until Windows 2000, SMB was tied to NetBIOS. Win2000 introduced SMB packet transport over TCP/IP. SMB was encompassed into Common Internet File System (CIFS). The underpinnings of CIFS is a hodge podge of documented and undocumented protocols. While the underlying protocols are ugly, what is presented to the users is a slick interface known as Network Neighborhood. The upgraded version of SMB that now runs on top of TCP/IP gets rid of legacy name resolutions known as WINS. Instead, CIFS now uses the open Dynamic DNS and Kerberos for authenticating. Microsoft now uses Active Directory which is similar but different than LDAP. The native files sharing used in the Unix world is NFS. NFS was developed by Sun Microsystems. Sun had made NFS available for Microsoft systems for years, but it has always been a commercial product. The most popular way to allow Unix and GNU/Linux systems to interoperate is to use Samba. Samba is derived from the letters SMB and its an open source implementation of CIFS. Chances are that Samba is already installed on your machine along with your GNU/Linux distribution. You can check to see if it is installed by issuing the following rpm commands.
  • Samba Server: The Samba server software supports the Server Message Block (SMB) and Common Internet File System (CIFS) file- and printer-sharing protocols. SMB and CIFS are most often used to share resources on local networks consisting of computers running Microsoft Windows. You would not typically share SMB/CIFS files and printers over a public network, such as the Internet. Samba services are off by default in Fedora and RHEL. To have Samba start automatically when you boot your computer, simply type chkconfig smb on as the root user. To start the service now, type service smb start. In order for Samba to be useful, edit the Samba configuration file,
    /etc/samba/smb.conf.
    

The next lesson shows you how to install and configure a Samba server.
[1]NetBIOS: A network protocol that allows hosts to have separate names--tied directly with their capabilities--that may be queried in real-time.

SEMrush Software 2 SEMrush Banner 2