Announcement

Collapse
No announcement yet.

How to Enable and Use Nautilus Samba/CIFS/Windows File Sharing Feature on Ubuntu 24.04 LTS

Collapse
X
Collapse
  •  

  • How to Enable and Use Nautilus Samba/CIFS/Windows File Sharing Feature on Ubuntu 24.04 LTS


    Nautilus file manager can share directories/folders of your Ubuntu 24.04 LTS system that you can access from Windows, MacOS, and other Linux devices.

    You may not find the file-sharing option in the context menu of the Nautilus file manager in a new Ubuntu 24.04 LTS installation. That’s because the Nautilus file-sharing option is not enabled by default.





    In this article, I will show you how to enable the Nautilus Samba/CIFS file-sharing option in a new Ubuntu 24.04 LTS installation. I will also show you how to use the Nautilus file-sharing feature to share a directory/folder of your Ubuntu 24.04 LTS system and access the shared folder from Windows and Linux operating systems.







    Table of Contents

    1. Installing Nautilus File Sharing Plugin on Ubuntu 24.04 LTS
    2. Adding the Ubuntu Login User to the sambashare Group
    3. Setting a Samba Share Password for the Login User of Ubuntu
    4. Sharing a Directory with Nautilus File Manager on Ubuntu 24.04 LTS
    5. Finding the IP Address of Ubuntu
    6. Accessing the Samba/CIFS Share from Other Linux Devices
    7. Accessing the Samba/CIFS Share from Windows 10/11
    8. How to Solve Nautilus Share Error: ‘net usershare’ returned error 255
    9. Conclusion









    Installing Nautilus File Sharing Plugin on Ubuntu 24.04 LTS

    To enable the Nautilus Samba/CIFS file-sharing feature, you must install the Nautilus file-sharing plugin on Ubuntu 24.04 LTS.

    First, update the APT package database cache with the following command:

    $ sudo apt update






    To install the Nautilus file-sharing plugin on Ubuntu 24.04 LTS, run the following command:

    $ sudo apt install nautilus-share




    To confirm the installation, press Y and then press .





    The Nautilus file-sharing plugin is being installed on Ubuntu 24.04 LTS. It will take a while to complete.





    At this point, the Nautilus file-sharing plugin should be installed.









    Adding the Ubuntu Login User to the sambashare Group

    Once the Nautilus file-sharing plugin is installed, you must add the login user of your Ubuntu system to the sambashare group. Otherwise, you won’t be able to share any directory/folder of your Ubuntu system using the Nautilus file-sharing plugin.

    To add the login user of your Ubuntu system to the sambashare group, run the following command:

    $ sudo usermod -aG sambashare $(whoami)




    For the changes to take effect, reboot your Ubuntu system.

    $ sudo reboot








    Setting a Samba Share Password for the Login User of Ubuntu

    You must also set a samba share password for the login user of your Ubuntu system to access the shared directories/folders from other devices.

    To set a samba share password for the Ubuntu login user, run the following command:

    $ sudo smbpasswd -a $(whoami)




    Type in a samba share password for the Ubuntu login user and press .





    Retype the samba share password for the Ubuntu login user and press .





    A samba share password should be set for the Ubuntu login user.









    Sharing a Directory with Nautilus File Manager on Ubuntu 24.04 LTS

    To share a directory/folder with the Nautilus file manager on Ubuntu 24.04 LTS, right-click (RMB) on the directory/folder and click on Sharing Options.





    To share the directory/folder, tick Share this folder.





    You will find a few sharing options:

    Share name[1]: The default share name should be the name of the directory/folder being shared. You can also set a custom name for the share.

    Comment[2]: An optional short description of the share.

    Allow others to create and delete files in this folder[3] and Guest access[4]: If you want to allow everyone (without needing to enter a correct username/password) full access (read+write) to this share, tick both of these options. If you want to allow everyone read access to this share, only tick Guest access[4].

    Once you’re done configuring the share options, click on Create Share[5].





    Once the directory/folder is shared, you will see a green indicator in the directory/folder as marked in the screenshot below.









    Finding the IP Address of Ubuntu

    To access the Samba/CIFS share from other devices, you must know the domain name or IP address of your Ubuntu 24.04 LTS system.

    To find the IP address of your Ubuntu system, run the following command:

    $ hostname -I




    The IP address of your Ubuntu system should be printed.

    In my case, the IP address of my Ubuntu system is 10.10.10.111.









    Accessing the Samba/CIFS Share from Other Linux Devices

    To access a Samba/CIFS share from other Linux devices, you need to access the share URL from the file manager in the following format:

    smb:///




    Here, is the domain name or IP address of the Samba/CIFS server and is the name of the Samba/CIFS share you want to access.

    For example, to access the Samba/CIFS share MyShare from the Samba/CIFS server (my Ubuntu system) with the IP address 10.10.10.111, you will need to access the share URL smb://10.10.10.111/MyShare from the file manager of your Linux distribution[1].

    Once you attempt to access the Samba/CIFS share, you will be prompted for the username and password. Type in the login username and password[2] and click on OK[4].

    If you want the file manager to remember the login username and password of the Samba/CIFS share so that you won’t have to type in the username and password in the future, make sure to tick Remember password[3]before clicking on OK[4].





    You should be able to access the Samba/CIFS share and all the shared files.









    Accessing the Samba/CIFS Share from Windows 10/11

    To access a Samba/CIFS share from Windows 10/11, you need to access the share path from the File Explorer in the following format:

    \\\




    Here, is the domain name or IP address of the Samba/CIFS server and is the name of the Samba/CIFS share you want to access.

    For example, to access the Samba/CIFS share MyShare from the Samba/CIFS server (my Ubuntu system) with the IP address 10.10.10.111, you will need to access the path \\10.10.10.111\MyShare from the File Explorer of your Windows 10/11 system[1].

    Once you attempt to access the Samba/CIFS share, you will be prompted for the username and password. Type in the login username and password[2] and click on OK[4].

    If you want Windows 10/11 to remember the login username and password of the Samba/CIFS share so that you won’t have to type in the username and password in the future, make sure to tick Remember my credentials[3]before clicking on OK[4].





    You should be able to access the Samba/CIFS share and all the shared files.









    How to Solve Nautilus Share Error: ‘net usershare’ returned error 255

    If you see the following error message while sharing a directory/folder from the Nautilus file manager on Ubuntu 24.04 LTS, it means you don’t have the necessary permissions to create Samba user shares. To obtain the necessary permissions to create Samba user shares from the Nautilus file manager on Ubuntu 24.04 LTS, you must add your login user to the sambashare group.

    'net usershare' returned error 255: net usershare: cannot open usershare directory /var/lib/samba/usershares. Error Permission denied



    You do not have permission to create a usershare. Ask your administrator to grant you permissions to create a share.










    Conclusion

    In this article, I have shown you how to enable the Samba/CIFS file-sharing feature in the Nautilus file manager on Ubuntu 24.04 LTS. I have also shown you how to use the Nautilus Samba/CIFS file-sharing feature to share a directory/folder of your Ubuntu 24.04 LTS system and access it from other Linux and Windows devices. I have shown you how to solve the Nautilus share error “’net usershare’ returned error 255” as well.





    More...
      Posting comments is disabled.

    Categories

    Collapse

    Article Tags

    Collapse

    There are no tags yet.

    Latest Articles

    Collapse

    • Using MAXQDA for Qualitative Data Analysis on Linux
      by Kasimba



      by George Whittaker


      Introduction

      Qualitative data analysis (QDA) is a cornerstone of research across various fields, from social sciences to marketing. It involves uncovering patterns, themes, and meanings within non-numerical data such as interviews, focus groups, and textual narratives. In this era of digital tools, MAXQDA stands out as a premier software solution for QDA, empowering researchers to organize...
      11-21-2024, 11:31 PM
    • HAProxy on Ubuntu: Load Balancing and Failover for Resilient Infrastructure
      by Kasimba



      by german.suarez


      Introduction

      In today’s fast-paced digital landscape, ensuring the availability and performance of applications is paramount. Modern infrastructures require robust solutions to distribute traffic efficiently and maintain service availability even in the face of server failures. Enter HAProxy, the de facto standard for high-performance load balancing and failover.


      This article...
      11-21-2024, 03:00 PM
    • Providing a license for package sources
      by Kasimba
      Arch Linux hasn't had a license for any package sources (such as PKGBUILD files) in the past, which is potentially problematic. Providing a license will preempt that uncertainty.

      In RFC 40 we agreed to change all package sources to be licensed under the very liberal 0BSD license. This change will not limit what you can do with package sources. Check out the RFC for more on the rationale and prior discussion.

      Before we make this change, we will provide contributors with...
      11-19-2024, 09:21 AM
    • Linux Binary Analysis for Reverse Engineering and Vulnerability Discovery
      by Kasimba



      by George Whittaker


      Introduction

      In the world of cybersecurity and software development, binary analysis holds a unique place. It is the art of examining compiled programs to understand their functionality, identify vulnerabilities, or debug issues—without access to the original source code. For Linux, which dominates servers, embedded systems, and even personal computing, the skill of binary analysis is...
      11-18-2024, 07:10 PM
    • Ubuntu vs Debian: Linux Distributions Compared Deep Dive
      by Kasimba
      Debian and Ubuntu are two popular Linux distributions. In this deep dive we will guide you on the key differences between them from perspective of both corporate enterprise and personal productivity or pleasure usage. After reading this blog post you should be in a better position to decide to select Ubuntu or Debian.
      Stewardship, Licensing, Community and Cost

      Where as Debian is 100% fully committed to free software as defined by the Debian Free Software Guidelines, Ubuntu is created...
      11-17-2024, 08:30 PM
    • Debian Backup and Recovery Solutions: Safeguard Your Data with Confidence
      by Kasimba



      by George Whittaker


      Introduction

      In the digital age, data loss is a critical concern, and effective backup and recovery systems are vital for any Debian system administrator or user. Debian, known for its stability and suitability in enterprise, server, and personal computing environments, offers a multitude of tools for creating robust backup and recovery solutions. This guide will explore these solutions,...
      11-13-2024, 05:30 PM
    Working...
    X