+4 votes
605 views
Install Samba on Ubuntu 21.04 | Hirsute hippo

in Linux / Unix by (552k points)
reopened | 605 views

1 Answer

+5 votes
Best answer

How to install Samba on Ubuntu 21.04

Sharing files between Windows and Linux operating systems can usually be a tedious task (unless we use removable media or email), due to the file system of both systems which are incompatible with each other, we cannot always resort to removable media or mail due to the size or the sensitivity of the information, so to avoid this and improve file sharing options between both systems Samba has been developed..

 

 

What is Samba
Samba is free software which has the GNU General Public License which integrates printing services and secure files for all clients that make use of the SMB / CIFS protocol, this improves the way we can exchange files between one system and another.

 

Samba can integrate Linux / Unix servers and desktops into Active Directory environments and is also capable of working as a domain controller or as a regular member of the domain.

 

characteristics
Among its characteristics we find:
  • Allows sharing of one or more distributed file system (Dfs) trees
  • One or more directory trees can be shared
  • Makes it easy to share server-installed printers with Windows clients on the local network
  • Help in Windows Internet Name Service (WINS) name server resolution
  • Allows users to browse the web

 

Now TechnoWikis will explain how to install Samba on Ubuntu 21.04..

 

 

To stay up to date, remember to subscribe to our YouTube channel!   SUBSCRIBE

 

 

How to install Samba on Ubuntu 21.04

 

Step 1

We check the use of Ubuntu 21.04 with the following command:
 lsb_release -a 
image

 

Step 2

Now we update the system with the command:
 sudo apt update 
image

 

Step 3

After this we will install Samba with the following command:
 sudo apt install samba * 
image

 

Step 4

We enter the letter S to confirm the download and installation of Samba:

 

image

 

Step 5

We will create the folder to be shared:
 sudo mkdir / home / sharedfolder 
image

 

Step 6

We copy the Samba configuration files to have a backup of them:
 sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.org 
image

 

Step 7

Now we will edit this configuration file with the desired editor:
 sudo nano /etc/samba/smb.conf 
image

 

Step 8

We go to the end of the file and enter the following:
 [sharedfolder] comment = samba on Ubuntu path = / home / sharedfolder browseable = yes readonly = no 
image

 

We save the changes with the Ctrl + O keys and exit the editor with the Ctrl + X keys.

 

Step 9

We restart the Samba service with the following command:
 sudo service smbd restart 
image

 

Step 10

We create the root user for Samba and grant permissions:
 sudo smbpasswd -a root 
We enter and confirm the password of this root user:

 

 

 

image

 

Step 11

It is time to grant the permissions in the system Firewall with the command:
 sudo ufw allow samba 
image

 

Step 12

With the command "ip add" we validate the IP address of Ubuntu 21.04:

 

image

 

Step 13

With this IP address in mind, we go to Windows 10 and open Run, there we enter the following syntax:
 \\ IP_Ubuntu_21.04 

image

 

Step 14

We click OK and this will open the folder that we have created to share in Ubuntu 21.04:


image

 

Step 15

When accessing it we must enter the root user with the password that we have defined:


image

 

Step 16

We click OK and we can create a file in the folder:


image

 

We confirm the operation of Samba in Ubuntu 21.04, in the terminal we enter the following:

 cd / home / sharedfolder ls 
Step 17

By listing the content we can see the file created in Windows 10:


image

 

Samba is an ideal functionality for the entire process of sharing files between Windows and Linux in a secure, agile and fully functional way..

 


by (3.5m points)
20210425
Thanx a lot, is working fine :-)
device= ASUSTeK N550JV amd64

Related questions

+3 votes
1 answer
asked Nov 12, 2020 in Linux / Unix by backtothefuture (552k points) | 402 views
+4 votes
1 answer
asked Nov 12, 2020 in Linux / Unix by backtothefuture (552k points) | 398 views
+4 votes
1 answer
asked Nov 6, 2020 in Linux / Unix by backtothefuture (552k points) | 616 views
+5 votes
1 answer
asked Nov 6, 2020 in Linux / Unix by backtothefuture (552k points) | 657 views
+3 votes
1 answer
asked Nov 5, 2020 in Linux / Unix by backtothefuture (552k points) | 435 views
Sponsored articles cost $40 per post. You can contact us via Feedback

Most popular questions within the last 30 days

10,659 questions
10,791 answers
510 comments
3 users