How to Install Samba and Create File Share on Ubuntu 20.04. In this post, we introduce Samba, its features, advantages then show you how to install Samba and create file share on Ubuntu 20.04.
First of all, Samba runs on most Unix like systems, such as Linux, Solaris, AIX, etc. It also runs on the BSD variants, including Apple’s macOS Server, as well as the macOS Client (Mac OS X 10.2 and later).
The installation procedure for Samba differs depending on which Unix or Linux version is in use by the operator. Due to the differences in technology between these operating systems, Samba is quite complex.
So, let’s start with How to Install Samba and Create File Share on Ubuntu 20.04.
Samba is an open source software that provides file and print services to SMB/CIFS clients. It is not just a simple file server but also a domain controller, a DNS server, and an Active Directory server. You can install Samba on all major operating systems like Windows, Linux, Unix, etc.
Moreover, Samba is client/server technology that implements the sharing of network resources between operating systems. This software is a reimplementation of the SMBnetwork protocol in free software.
The name Samba comes from SMB (Server Message Block), the name of a proprietary protocol used by the Microsoft Windows network file system. Server Message Block, develop by Windows, also integrates into Windows products since the early 1990s. As of version 4, Samba supports Active Directory and Microsoft Windows NT domains.
It disperses file and printer services to Windows clients, and it integrates with Windows Server domains as the main DC or a member of the domain. Samba also transports transaction protocols for inter process communications. It works like a centralized system which really works for connecting different OSes to available resources which need to be shared.
In normal cases, when you are talking about sharing files or other documents, the process is quite complicated, especially when exchanging data among the various operating systems. But, systems in connection with the Samba server are able to easily share or share files.
The samba server on Linux has been considered one of the more powerful servers which makes it easier for other operating systems to access shared files and useful resources such as printers.
Some of the major advantages of Samba are shown below:
Offers stability and better performance
Primarily speaking, Samba is a free and open source software that provides stability and performance to Linux and Unix servers. It has years of experience and is a great option for an SMB stack, especially for production environments.
Flexible and Reliable
Then, with Samba is an application suite that helps in sharing files, printers, and other important information across the network. It also helps in providing security for shared files on Windows computers. Samba offers flexibility, reliability, scalability, ease of installation, interoperability with Windows machines, as well as many other features.
Ability to work as a cluster
Samba servers works as a cluster. This means that there is no single point of failure and it is easy to scale the system to meet the needs of an organization. You can also use SAMBA+ server for file and print services, which are commonly needed by an organization.
In a private share, only authenticated user can access their personal files over the network. In this section, we will show you how to create a private share in Samba.
Create a User for Samba
First, you will need to create a user for Samba. You can create it with the following command:
adduser sambauser
Set a user’s password as shown below:
Adding user `sambauser' ...
Adding new group `sambauser' (1000) ...
Adding new user `sambauser' (1000) with group `sambauser' ...
Creating home directory `/home/sambauser' ...
Copying files from `/etc/skel' ...
New password:
Retype new password:
passwd: password updated successfully
Changing the user information for sambauser
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] Y
Next, you will also need to set a Samba password for the created user.
smbpasswd -a sambauser
Set a password as shown below:
New SMB password:
Retype new SMB password:
Added user sambauser.
A public share is a share that is available to everyone in the network. Any user in the network accesses the public share without providing a username and password. In this section, we show you how to create a public share in Samba.
Create a File and Directory for Public Share
First, create a files and directory for public share using the following command:
How to Install Samba and Create File Share on Ubuntu 20.04 Conclusion
In this guide, we have explained how to install Samba and create a public and private file shares on Ubuntu 20.04. Samba is a program that allows end users to access and use printers, files, and other frequently shared resources over the Internet.
It uses the Server Message Block (SMB) protocol to facilitate the sharing of files, folders, and the distribution of printers across a network. Without having to install the NFS service on the Window system, Samba provides complete networking functionality with Windows.
In addition, Unix based systems may use Samba to facilitate SMB access to file and printing services. For many years, SMB has been used mostly for connecting Windows computers, though most other systems, such as Linux and macOS. Windows clients utilize the files and printer resources on a server by passing the server message block through a NetBIOS session.
Take a look at our Ubuntu content by navigating to our blog here and also for more printing content click here.
I am a fan of open source technology and have more than 10 years of experience working with Linux and Open Source technologies. I am one of the Linux technical writers for Cloud Infrastructure Services.
51vote
Article Rating
Subscribe
Login and comment with
I allow to create an account
When you login first time using a Social Login button, we collect your account public profile information shared by Social Login provider, based on your privacy settings. We also get your email address to automatically create an account for you in our website. Once your account is created, you'll be logged-in to this account.
DisagreeAgree
Login and comment with
I allow to create an account
When you login first time using a Social Login button, we collect your account public profile information shared by Social Login provider, based on your privacy settings. We also get your email address to automatically create an account for you in our website. Once your account is created, you'll be logged-in to this account.