Samba server: concepts and quick configuration
Table of contents:
- Let's learn a little Samba
- Why use Samba?
- Functioning
- Setting
- What can Samba do for me?
- Let's now see Samba in action
Samba is a free software project that implements the Windows shared file protocol for UNIX-like operating systems. This protocol was previously known as SMB, later cataloged as CIFS. In this way, the fact that computers with GNU / Linux, Mac OS X or Unix in general, are seen as servers or relate as clients in Windows-based networks, becomes a reality.
Index of contents
Let's learn a little Samba
The creation of Samba is the idea of Andrew Tridgell. It is a project that was born in 1991 when it created a file server program for its local network, which supported a protocol recognized as DEC by Digital Pathworks. Although he didn't know it at the time, that protocol would become SMB later.
Why use Samba?
Samba is basically a suite of Unix applications that implements the SMB (Server Message Block) protocol. This protocol is used for client-server operations on a network. Then, by using this protocol, Samba allows Unix to establish communication with Microsoft Windows products through the protocol. In this way, a Unix machine with Samba can enter the Microsoft network, showing itself as a Server and provide the following services:
- Share various file systems. Share printers, with installation on the server as well as on the clients. Provide a visualization of clients on the network, which will facilitate collaboration with our users. It allows verification of clients through a login against a Windows domain.Provide or assist with a WINS name resolution server.
Functioning
Today, the Samba Suite includes in its implementation a couple of fundamental demons. These are responsible for providing shared resources to SMB clients on the network (also called services).
The aforementioned demons are:
smbd: It is the daemon in charge of allowing file and printer sharing over the SMB network, in addition to providing verification and granting authorization for access by SMB clients.
nmbd: It is the daemon that is in charge of searching through the Windows Internet Name Service (WINS), and provides the necessary help through a viewer.
Setting
The configuration of Samba in Linux is done through the edition of a single file located in
/etc/samba/smb.conf.
Here is an example of a basic configuration:
# ============== Global Settings =================== # workgroup = PRUEBAGROUP server string = Samba% v wins support = no load printers = no # ======= Security ======= # security = user map to guest = bad user guest ok = yes public = yes hosts allow = 127.0.0.1 192.168.22.0/24 hosts deny = 0.0.0.0/0 # ============== Sharing definition ================== # comment = Music test. path = / home / Data / Music / available = yes browsable = yes writable = no copy = Music comment = Test videos. path = / home / Data / Videos / copy = Music comment = Other data. path = / home / Data / Box / writable = yes
What can Samba do for me?
As previously mentioned, Samba provides all the help so that Windows and Unix machines can coexist on the same network. However, we can point out specific reasons why you would like to install a Samba server on your network. We list them below:
- You want to save the expense of paying a Windows NT server to obtain the functionalities that it provides us. You want to provide a common space to carry out data transfers between an NT Server to Linux or vice versa. To share other resources such as printers, between Windows clients and Linux. It is useful to establish communication to NT files from a Linux server.
Let's now see Samba in action
We will assume that we have the following basic network configuration:
- A Samba server on a Linux machine, we will call this hydra. A couple of Windows clients, whose names will be phoenix and chimaera. All connected via local area network (LAN). Additionally, we will also assume that hydra has an injection printer connected. and a disk share called network (both resources can be offered to the other two machines).
The representative graph of this network can be seen in the figure below:
As can be seen, in this network, each of the computers is within the same workgroup. For those who are not related to the term, a Working Group is a simple label that identifies a specific set of machines / computers / equipment that belong to an SMB network. Several working groups can coexist in the same network, but for the purposes of the example we only put one.
We hope you liked our introductory article to Samba, remember that if you are interested in taking full advantage of your Linux system, you can take a look at our section.
Rx 5700 xt and rx 5700 will have the same memory configuration and rop
AMD officially unveiled the RX 5700 XT and RX 5700 graphics cards that will compete inch by inch with the RTX 2060 and RTX 2070.
▷ Parts of a processor outside and inside: basic concepts?
If you want to know all the parts of a processor, in this article we see its internal and external structure together with its functions ✅
Hardware and software: definitions and concepts
We explain the main differences in the concepts of hardware and software. We will learn their definitions and main products.