Samba Server: Definition, Functions, and How to Install

Are you looking for information about what is a samba server ? Exactly you visited this article, because we will provide information about what a samba server is . Creating a website is not a simple job. Website creation can only be done by people with coding skills.

Understanding, Functions, and How to Install Samba Server

A. Understanding Samba Server

Surely some of you have used the FTP (File Transfer Protocol) protocol to share data or printer services on Windows OS together. As it turns out, you can also rely on another program that works on the UNIX family of operating systems called Samba Server.

Samba Server is a program with a client server protocol that can be likened to a bridge that connects the service provision process to share data or documents between the UNIX family of operating systems and Microsoft Windows operating systems.

This software operates under the auspices of the UNIX family operating system platform using the SMB protocol which is also used by the Microsoft Windows operating system to function as a client server network in the process of using data and resources that you want to support together in a network.

This software is open source (free creation/distribution) which allows files across Windows and Unix operating systems to be shared simply and easily.

This program serves things like file sharing, NetBIOS name resolution printer sharing, and service announcements. Like a file server application, Samba allows files, printers, and other resources to be shared by multiple users on UNIX OS, and allows interoperability with Windows OS.

B. Samba Server Functions

After studying the meaning of Samba Server, you may already understand a little about its functions. The following are some of the functions of the samba server:

  • Serves as a bridge between the UNIX operating system and the Microsoft Windows operating system in connecting file sharing or document sharing, printing equipment sharing and other supporting devices.
  • Functions as a Primary Domain Controller (PDC) that authenticates users who have permission to access the resources provided.

C. Advantages of Samba Server

The samba program is trusted and used by many people because of the various advantages it offers. Its advantages include free, good performance in resource sharing, reliable because it rarely experiences problems, is available for various platforms, supports various UNIX family operating systems, is directly connected to the network, easy to configure and use according to administrator needs.

D. Samba Server Components

  • Smbd is a daemon or background program that actually manages file system and printer sharing services for clients. Smbd will duplicate itself when the client authenticates, the original part will return to port 139 to listen for new requests and the duplicate part will take care of the connection to the client.
  • The nmbd background program handles NetBIOS name server requests. Unlike smbd, nmbd does not duplicate itself to handle every query.
  • Smbclient is an application to access SMB resource shares with a view resembling FTP.
  • Smbtar is a program that suggests shared data.
  • Nmblookup is a program that helps lookup names using NetBIOS over TCP/IP. Nmblookup can be used to resolve computer names to IP numbers or vice versa.
  • Smbpasswd is a program that allows administrators to set the encrypted password used by the Samba Server.
  • Smbstatus is a program that monitors the latest status of shared resources provided by the Samba Server.
  • Testparm is a small program for debugging Samba configuration files.
  • Samba Web Administration Tool or abbreviated as Swat is a program that provides a web model interface for administering Samba. With the support of very useful help files, Swat makes it easy to edit Samba configuration files, manage resource shares and view the latest Samba status.

E. How to Install Samba Server

  1. Make sure you are connected to the network and have an IP Address for your Ubuntu Server.
  2. If you have got an IP address, then install Samba Server on Ubuntu Server 20.04 by running the following command:
  • To update or update the repository
sudo apt update
  • To install Samba server
sudo apt install samba
  1. After the Samba Server has been successfully installed, please check again by entering the following command:
whereis samba

The command will display the location where the Samba Server is installed, both the location of the configuration file and other things in case you need it later.

F. How to Configure Samba Server

1. Setting Global Samba Server

Before sharing a resource, you must first create a file or directory to share. There are two types of access in this installation:

  • Samba access uses anonymous credentials, which do not require a username and password to access them.
  • Samba that requires a username and password to access
  1. For this setting you need to edit the Samba configuration file found in /etc/samba/smb.conf. Back up the original Samba configuration file first by running the following command:
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.asli
  1. Please start by creating a folder that will be shared using the Samba Server.
  2. After the folder has been successfully created, now you have to do a short configuration on the smb.conf file located in /etc/samba/. Run the following command to make edits to the Samba configuration:
sudo nano /etc/samba/smb.conf
  1. After editing the samba configuration, add or change the configuration to the following:

server min protocol = NT1

lanman auth = yes

ntlm auth = yes

security = user

For those of you who use Windows OS devices, make sure they are in the same workgroup, for example in this installation use a workgroup with the name “WORKGROUP”

Run the command to restart Samba

sudo systemctl restart smbd

2. Setting Anonymous Samba Server

Create a samba directory that can be accessed anonymously. This example will use the “/srv/samba/anonymous_shares” folder. Run the following command:

sudo mkdir -p /srv/samba/anonymous_shares

Setting permissions

sudo chmod -R 0775 /srv/samba/anonymous_shares

sudo chown -R nobody:nogroup /srv/samba/anonymous_shares

Edit configuration file

samba server

Adjust the settings in the Samba configuration to allow anonymous access. Run the following command:

sudo nano /etc/samba/smb.conf

The next step is to add the following line to the bottom line:


comment = Anonymous File Server Share

path = /srv/samba/anonymous_shares

browsable =yes

writable = yes

guest ok = yes

read only = no

force user = nobody

Restart Samba by running the command :

sudo systemctl restart smbd

3.  Setting Secure Samba Server

  • Create a new group to add Samba access with credentials. This installation uses the “smbgrp” group and each user will be given a password. In this example, using the user “penguin” with the password “linux”. To add, run the following command:
sudo addgroup smbgrp 

sudo useradd -s /bin/false penguin 

sudo usermod penguin -aG smbgrp 

sudo smbpasswd -a linuxpenguin
  • Create a samba directory (path of a group of files) that is used to share resources. For example, this time we will use the “/srv/samba/secure_shares” folder. Done by running the command:
sudo mkdir -p /srv/samba/secure_shares
  • Setting permissions
sudo chmod -R 0770 /srv/samba/secure_shares

sudo chown -R root:smbgrp /srv/samba/secure_shares
  • Edit configuration file

Samba Server: Definition, Functions, and How to Install

The next step is to adjust the settings in the Samba configuration. So that users can login with credentials add the setting “security = user” in the global section. Then, run the following command:

sudo nano /etc/samba/smb.conf

The next step is to add the following line to the bottom line:


comment = Secure File Server Share

path = /srv/samba/secure_shares

valid users = @smbgrp

guest ok = no

writable = yes

browsable = yes
  • Restart Samba by running the command:

Samba Server: Definition, Functions, and How to Install

sudo systemctl restart smbd

If you want to access the Samba Server using the secure option whose security is guaranteed, it can be done by inputting the \\IP address of the Ubuntu installed Samba. For example, using IP then access uses the address \\ .

Thus the information that we can convey about what a samba server is, hopefully the information we convey about what a samba server is, is useful for you. For those of you who are still confused about website creation and SEO, please contact Jogja website services or Jogja SEO services right now.

Have A Nice Day 😊