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

    • Linux Trends Shaping the Future of Data Mining
      by Kasimba



      by George Whittaker


      Introduction

      In the digital age, where data is often referred to as the "new oil," the ability to extract meaningful insights from massive datasets has become a cornerstone of innovation. Data mining—the process of discovering patterns and knowledge from large amounts of data—plays a critical role in fields ranging from healthcare and finance to marketing and cybersecurity....
      01-13-2025, 09:40 PM
    • Exploring Statistical Analysis with R and Linux
      by Kasimba



      by George Whittaker


      Introduction

      In today's data-driven world, statistical analysis plays a critical role in uncovering insights, validating hypotheses, and driving decision-making across industries. R, a powerful programming language for statistical computing, has become a staple in data analysis due to its extensive library of tools and visualizations. Combined with the robustness of Linux, a favored platform...
      01-13-2025, 09:40 PM
    • Securing Network Communications with a VPN in Linux
      by Kasimba



      by George Whittaker


      Introduction

      In today’s interconnected digital landscape, safeguarding your online activities has never been more critical. Whether you’re accessing sensitive data, bypassing geo-restrictions, or protecting your privacy on public Wi-Fi, a Virtual Private Network (VPN) offers a robust solution. For Linux users, the open source ecosystem provides unparalleled flexibility and control when...
      01-13-2025, 08:30 PM
    • How Nagios Can Transform Your System Monitoring Game
      by Kasimba



      by George Whittaker


      Monitoring the performance of Linux systems is a critical task for administrators aiming to ensure reliability, efficiency, and security. When it comes to robust and scalable monitoring, Nagios emerges as a powerful solution. This article delves into the intricacies of Linux system performance monitoring using Nagios, providing a comprehensive guide for both beginners and seasoned professionals.
      ...
      01-13-2025, 07:30 PM
    • Boost Your Linux System: Exploring the Art and Science of Performance Optimization
      by Kasimba



      by George Whittaker


      Performance is a cornerstone of effective system administration, particularly in the Linux ecosystem. Whether you're managing a high-traffic web server, a data-intensive application, or a development machine, tuning your Linux system can lead to noticeable gains in responsiveness, throughput, and overall efficiency. This guide will walk you through the art and science of Linux performance tuning and...
      01-13-2025, 07:30 PM
    • Building Virtual Worlds on Debian: Harnessing Game Engines for Immersive Simulations
      by Kasimba



      by George Whittaker


      Introduction

      The creation of virtual worlds has transcended traditional boundaries, finding applications in education, training, entertainment, and research. Immersive simulations enable users to interact with complex environments, fostering better understanding and engagement. Debian, a cornerstone of the Linux ecosystem, provides a stable and open-source platform for developing these simulations....
      01-13-2025, 07:30 PM
    Working...
    X