Install, Configure and Connect Samba on Ubuntu Using GUI

LINUX
FUNDAMENTALS
A Complete Guide for Beginners Enroll Course Now

Ubuntu Samba GUI (Graphical User Interface) is an assembly of graphical tools and services that provide a user-friendly interface and let users configure and manage the Samba shares very easily on Ubuntu. Throughout the article, I have mentioned different GUI utilities for Samba share in a simplified process. Let’s explore it.

Process Flow Chart to Install, Configure & Connect Samba Using GUI

Flowchart on how to install, configure and connect Samba share using GUI[Distro Used Throughout the Tutorial: Ubuntu 22.04.2 LTS]

Installing Samba on Ubuntu Using GUI

In case of using newer Ubuntu versions, you may face problems during samba installation using GUI. So, I have explained all the steps below of how you can install Samba using the command line interface on your new version of Ubuntu without any hassle:

  1. First, open the Ubuntu terminal & install the apt packages by using the following command:
    sudo apt-get update
    EXPLANATION
    • sudo: Super User DO.
    • apt-get: Advanced package utility.
    • update: Updates on the local system.
    Updating advanced package utility for Samba
  2. Then, install Samba packages running the following command:
    sudo apt install samba

    Installing Samba

  3. Now, you can check if you have installed Samba successfully or not using the command below:
    whereis samba
    EXPLANATION
    • whereis: Returns the source, binary and manual page files of given commands.
    • samba: Free packages.
    Checking if Samba is installed successfully or not
  4. You can make a Samba user directory using GUI So, go to Files and then click on the Home section.Going to home to make a directory to install Samba using GUIAfter that, click on the 3rd and 4th option accordingly like the above image.
  5.  Write a folder name according to your choice and click Create:Making a directory named 'sambashare' to install Samba using GUIHere, I have created a directory named sambashare.

Read More: How to Install and Configure Samba Server in Ubuntu? [4 Steps]

Configuring Samba on Ubuntu Using GUI

During Samba configuration using GUI, there may arise some problems regarding firewall configuration, Samba password creation and adding user operation to the Samba database. So, to avoid these you need to configure Samba on Ubuntu by following the steps below:

  1. Open Ubuntu terminal & restart the Samba services using the command below:
    sudo service smbd restart
    EXPLANATION
    • sudo: Super User DO.
    • service: The services sudo provides.
    • smbd restart: Restart Samba service.
  2. Now, if you are using UFW for your firewall configuration, then you will need to allow the ‘samba’ profile by using the following command:

    sudo ufw allow samba
    EXPLANATION
    • sudo: Super User DO.
    • ufw: Uncomplicated Firewall.
    • allow samba: Allows ‘samba’ profile.
  3. Restarting Samba service and creating firewall configuration

  4. Add a user to Samba database by setting & re-confirming new user password for Samba like the following. Here, I have added the user “nadiba”, you can add any of your likings:

    sudo smbpasswd -a nadiba
    EXPLANATION
    • sudo: Super User DO.
    • smbpasswd: Samba encrypted password file.
    • -a nadiba: Indicates the user.

    Setting Samba password and adding user

  5.  Now, go to settings>sharing and turn on the sharing button like the image below:Turning on sharing button
  6.  To share a folder go to Files and find the folder. Then, right-click on it and select the Local Network Share option. Here, I have located at Files>Home>sambashare:Going to 'Local Network Share' option by right clickingNow, select ‘Share this folder’ folder option and click ’Create Share’.Click on 'Create Share' option
  7. To set user access right click on the shared folder and select Properties.Going to 'Properties' option to give user access
  8. Then, in the Permissions section click on the ‘Change Permissions for Enclosed Files’ option.Going to 'Permissions' section
  9. You can see several permission options. Change according to your need and to save the changes click on the Change button.Changing permissions if neededNow, your configuration is done for Samba Share.

Read More: How to Configure NFS Server in Linux? [5 Steps]

Connecting Samba Share Using GUI

You can connect and access the Samba share using GUI from a different system. Before that, you need to know the IP address of the Samba server. So, to get it follow the steps below:

  1. Open the Ubuntu application and click ‘Settings’.Going to Settings to find 'Network' option
  2. In the ‘network’ panel, click on the icon marked on the Wired section like the image below.Clicking on 'Wired' section
  3. Now in the ‘Details’ section, you will find the IPv4 address which is the required IP address. For my system, the IP address is 192.168.211.128.Checking IP addressCopy the IP address of Samba share of your system for further use.

Now, I will show two cases for connecting to Samba share using GUI from Linux and Windows.

A. Connecting or Mounting to Samba Share on Linux

You can access the Samba shares using the default file manager from Linux. Go through the steps below:

Also, you can view this guide to learn more about How to Unmount Samba Shares Using GUI on Ubuntu.
  1. First, open ‘Files’ & click on ‘Other locations’ at the bottom.Go to 'Other locations' option under files
  2. Place the Samba share’s address in the ‘Connect to Server’ option like the following:
    smb://192.168.211.128/sambashare
    EXPLANATION
    • 192.168.211.128: Server IP address.
    • sambashare: Shared folder name.

    Write Samba share address

    Press ‘Connect’ after placing the address of Samba shares. In the above image, I have used the address of my system.

  3. After prompting to the following screen, click on the ‘Registered User’, enter the Samba username & password. and then click on the ‘Connect’ button:Provide password for authentication
  4. Doing so, you will find the files & folders on the Samba server.Connected to Samba shareIn the above snapshot, I have shown the folder ‘new_samba’ inside the Samba shared folder sambashare.

B. Connecting to Samba Share on Windows

As a Windows user, you can connect to Samba share using the file explorer in GUI. Follow the steps below to access the Samba shares:

  1. Open the file explorer and select ‘This PC’ from the sidebar.Going to 'Add a network' optionClick on the ‘Add a network location’ option like the above image.
  2. Hit ‘Next’ to continue.Clicking 'Next' to add the network location wizard
  3. Then, select the ‘Choose a custom network location’ & press ‘Next’.Clicking 'Next' to choose a custom network location
  4. Now, specify the location in the ‘Internet or network address’ option like the following:
    \\192.168.211.128\sambashare
    EXPLANATION
    • \\192.168.211.128\sambashare: \\server IP address\sharename.
    Specifying network locationClick ‘Next’ as shown above to move forward.
  5. Now, enter the network credentials prompted to you & click ‘OK’.Entering credentials to specify location
  6. Type a name for the network location of your choice and click ‘Next’. Otherwise, the Samba server takes up the default name for the location.Giving custom network location name
  7. Now, you can see ‘Completing the Add Network Location Wizard’ in the prompted window like the image below:Completing adding networkClick ‘Finish’ to end the task.
  8. Finally, you find the folders on the Samba server.Shared folder on Windows

By following the above task step by step, you can connect the Samba shares from Windows very easily.
Read More: How to Access Samba Share from Windows [2 Methods]

How to Check Ubuntu Version

Note: Sometimes you may face the problem ‘Unable to locate Samba package’ while configuring Samba share using GUI tools. It happens if the package repository is not enabled or not available in your Ubuntu version. So, to get over it you must know your Ubuntu version first.

I have mentioned below how you can check your system’s Ubuntu version using both the graphical interface and command line in your terminal.

A. Check Ubuntu Version Using GUI

If you want to know which Ubuntu version your computer is running through the system settings, then follow the steps below:

  1. First, open the Ubuntu application & select ‘Settings’.Going to settings to find 'About'
  2. Scroll down and click on ‘About’ in the left pane.Ubuntu version checkingNow, you will find the basic details of the system including the Ubuntu version you are running. According to the above snapshot you can see, my system is running Ubuntu 22.04.2 LTS.

B. Check Ubuntu Version Using Terminal

To get the Ubuntu version fast, go with the terminal check viewing the steps below:

  1. Open your Ubuntu terminal, write the following line and you will see the output like the image below:
    lsb_release -a
    EXPLANATION
    • lsb_release: Collects LSB(Linux Standard Base) & distribution information about the Ubuntu operating system.
    • -a: All information including LSB, distributor ID, description, release, codename of the system.
    Ubuntu version checking from terminal
  2. But if you want only a cleaner description, then run the command line below:
    lsb_release -d
    EXPLANATION
    • -d: Displays only the description.
    Ubuntu version checking-only descriptionYou will get the output of the version of your system as like the snapshot above. Here, my system runs Ubuntu 22.04.2 LTS.

How to Unmount Samba Shares Using GUI on Ubuntu

To unmount the mounted Samba shares using GUI, follow the steps given below:

  1. Open ‘Files’ application. In Ubuntu, ‘Nautilus’ is the default file manager.Opening the Samba shared folderYou will find the mounted Samba share at the bottom of the left pane.
  2. Right click on the mounted Samba share and from the context menu select ‘Unmount’ or ‘Eject’– whatever comes to you.Unmounting the mounted shared folderTo verify the unmount operation, go to ‘Other Locations’ option & you will find that the Samba share folder is no longer there.

How to Check & Switch Current Target Boot

If you ever feel the need to change the default target manually while booting your system, you may follow the steps below:

  1. Open the Ubuntu terminal and check the default boot mode by running:
    sudo systemctl get-default
    EXPLANATION
    • sudo: Super User DO.
    • systemctl get-default: Retrieves the default target boot(The initial system state).
    Checking default target during system bootingThe output will likely be either the ‘graphical.target’ or ‘multi-user.target’. From the above image you can see that in my system the initial state, ‘multi-user.target’ is loaded during the target boot process which represents the ‘Command Shell Mode’.
  2. Now, to convert the target permanently use the following command:
    sudo systemctl set-default graphical.target
    EXPLANATION
    • sudo: Super User DO.
    • systemctl set-default: Sets default target for system.
    • graphical.target: GUI environment.
    Changing default targetAs my initial state was in ‘Command prompt’ mode, I have switched it to GUI mode. You will perform it according to your initial state.

Troubleshooting Connectivity Issues in Linux

There are several steps you can take to troubleshoot the connectivity issues. I have mentioned a detailed guideline for troubleshooting below.

How to Monitor the System Using GUI in Linux

System Monitor offers a user-friendly built-in GUI application to monitor system usage. I have mentioned the steps to access and use it for troubleshooting:

  1. Open Ubuntu application and type ‘System Monitor’ in the search bar.Going to 'System Monitor'To launch the application click on the System Monitor’s icon.
  2. A new window will open where you will find some tabs mentioned below:
    • Processes: This tab shows the running processes’ names and their resource usage.
    • Resources: This displays detailed information about CPU, memory and disk usage.
    • File Systems: It offers information about the mounted file systems.

    Viewing the system and monitoring

  3. Now, monitor the system resources from every aspects, identify and troubleshoot issues.

Troubleshooting Connectivity Issues Using “traceroute”

In Linux, traceroute command doesn’t come by default. So, to use you have to install and then run the command following the steps below:

  1. Open Ubuntu terminal and install traceroute by using the following command:
    sudo apt-get install traceroute
    EXPLANATION
    • sudo: Super User DO.
    • apt-get install: Install advanced package utility.
    • traceroute: Tracks the path a data packet takes.
    Installing 'traceroute' command
  2. To list the route to linuxsimply.com run the command below:
    traceroute linuxsimply.com
    EXPLANATION
    • traceroute: Tracks the path a data packet takes.
    • com: Destination.
    Running 'traceroute' command
    OUTPUT ANALYSIS
    • Testing Network Path: Test IP addresses to know which path is used to reach destination by the packets and search for problematic hops.
    • Checking Round Trip Time (RTT): Check round trip time for each hop (network node). High RTT indicates latency issues, network congestion.
    • Identifying Packet Loss: Search for asterisks (*) which indicate packets were dropped along the route. Huge packet loss creates network issues.

Troubleshooting Connectivity Issues Using “ping”

To troubleshoot using ping command, open the terminal and run the following command:

ping -c 3 linuxsimply.com
EXPLANATION
  • ping: Packet internet Groper is used to find out the internet connectivity.
  • -c 3: Limits the number of packets.
  • com: Destination.
Running 'ping' command with options on Ubuntu
OUTPUT ANALYSIS
  • Limiting packets: You can limit packet number by your choice. Here, I have used the -c 3 option to limit the packet number to 3 and so the command stops after transmitting 3 packets.
  • Checking Packet Loss: Check the packet loss statistics. Here, the output shows 0% packet loss.
  • Checking Round Trip Time (RTT): Check the round trip time for each packet. At the end, you can see a summary of RTT: minimum RTT, average RTT, maximum RTT, and mean deviation of RTT.

Troubleshooting Connectivity Issues Using “netstat”

The following steps may be of your help if you want to troubleshoot network related problems using netstat command. The steps are:

  1. Start opening your Ubuntu terminal and type the following command:
    sudo apt install net-tools
    EXPLANATION
    • sudo: Super User DO.
    • apt: Advanced package utility.
    • install net-tools: Install netstat command under net-tools.
    Installing 'net-tools' to run 'netstat' command in UbuntuThen, enter the password and netstat will be installed.
  2. Observe the netstat command running:
    netstat
    EXPLANATION
    • netstat: Network statistics display network-associated information.
    Running 'netstat' command in UbuntuYou can analyze the output by the following facts:

    • Local & foreign Address: The local and foreign address indicates the IP and port number of your system & the remote system you are connected to respectively.
    • State: It represents the current state of the connection like ‘ESTABLISHED’, ‘LISTEN’ Check if there are any abnormal states.
  3. If you want only the tcp connection and listening sockets, then type the following command:
    netstat -lt
    EXPLANATION
    • netstat: network Statistics display network associated information.
    • -lt: Displays only the tcp (Transmission Control Protocol) connections and listening sockets.
    Running 'netstat' command with options in Ubuntu From the output you can see the sockets’ states are ‘LISTEN’ And all the connections showing are tcp connections.

Conclusion

Samba graphical interface on Ubuntu simplifies the setting process and improvises the user experience intrinsically. I have utilized the important GUI applications for Samba share in this article. So, by reading the whole article I think you will gain the actual insights of Ubuntu Samba GUI.

People Also Ask

How to install Samba on Ubuntu?

To install Samba server on Ubuntu, open the terminal and run the command sudo apt-get install samba. Type “y” when prompted to confirm the installation and successfully install Samba on your Ubuntu system.

Does Samba have a GUI?

Yes, the Samba server configuration tool itself is a graphical interface that manages and modifies Samba shares and other settings.

Can I know which Samba version I am using on Ubuntu?

Yes, you can. Open the terminal and type the command samba -V to check the currenct Samba version running on your Ubuntu system.

What are the advantages of using Samba?

There are several advantages of using Samba such as cross-platform compatibility, resource sharing, collaboration. enhanced connectivity, etc.

How to connect to a Samba share in Linux?

To connect to a Samba share in Linux, use the smbclient tool that enables users to gain access to Samba using the command line. For instance, to connect to a share named josh on a Samba server with an IP address 192.168.121.118 as a user josh, use the command smbclient //192.168.121.118/josh -U josh.


Related Articles 

5/5 - (2 votes)
Nadiba Rahman

Hello, This is Nadiba Rahman, currently working as a Linux Content Developer Executive at SOFTEKO. I have completed my graduation with a bachelor’s degree in Electronics & Telecommunication Engineering from Rajshahi University of Engineering & Technology (RUET).I am quite passionate about crafting. I really adore exploring and learning new things which always helps me to think transparently. And this curiosity led me to pursue knowledge about Linux. My goal is to portray Linux-based practical problems and share them with you. Read Full Bio

4 thoughts on “Install, Configure and Connect Samba on Ubuntu Using GUI”

  1. Lol. this will not work.. you will need to edit conf (samba conf) as well so there permissions to access specified folders. This article is garbage.

    Reply

Leave a Comment