How to Use System-Config-Samba on Ubuntu 16.04

System-config-samba is a GUI for managing samba shares and users. In a previous tutorial, I explained how to set up a Samba server on Ubuntu 16.04 from the command line , but the Samba configuration file can be confusing to beginners. So this tutorial is going to show you how to use a graphical tool (system-config-samba) to set up Samba server.

Installing Samba Server on Ubuntu 16.04

Before using system-config-samba, let’s install the Samba server suite from Ubuntu repository by running the following command in terminal.

sudo apt install samba samba-common-bin

The latest stable version available is 4.7.4, released on December 22, 2017. To check your Samba version, run

smbd --version

Sample output:

Samba version 4.3.11-Ubuntu

To check if Samba service is running, issue the following commands.

systemctl status smbd

systemctl status nmbd

To start these two services, issue the following commands:

sudo systemctl start smbd

sudo systemctl start nmbd

Once started, smbd will be listening on TCP port 139 and 445. nmbd will be listening on UDP port 137 and 138.

  • TCP 139: used for file and printer sharing and other operations.
  • TCP 445: the NetBIOS-less CIFS port.
  • UDP 137: used for NetBIOS network browsing.
  • UDP 138: used for NetBIOS name service.

Installing system-config-samba

Run the following command to install it.

sudo apt install system-config-samba

Then we can start it from command line.

sudo system-config-samba

If you get the following error:

could not open configuration file `/etc/libuser.conf': No such file or directory

You can fix it by creating an empty /etc/libuser.conf file with the following command.

sudo touch /etc/libuser.conf

Then re-run the start command. Here’s the default interface.

system-config-samba

Create a Samba Share

First, let’s create a Samba user. We can now open up a new terminal window (because the current terminal window is being used by system-config-samba) and create a Linux user with the following command. Replace username with your preferred username.

sudo adduser username

Enter your sudo password. Then set a password for the new user. You can press Enter to answer the remaining questions.

ubuntu samba private share

Next, we also need to set a separate Samba password for the user.

sudo smbpasswd -a username

Now in the Samba GUI, click Preferences > Server Settings menu. Make sure the value of workgroup is the same with the workgroup settings of Windows computers.

samba workgroup

You can find the workgroup setting on your Windows computer by going to Control Panel > System and Security > System.

samba ubuntu server

Then click the plus button to create a Samba share. In the Basic tab, specify

  • the directory/folder you want to share (I use /home/linuxbabe/private as an example)
  • the share name
  • a description of the share
  • whether the remote user can write to the Samba share or not
  • whether other computers in your network can see the Samba share or not (normally yes)

ubuntu 16.04 samba private share

In the Access tab, select the Samba user you just created and click OK. If the Samba user isn’t displayed, please restart system-config-samba. If you select Allow access to everyone, then others in the same network can access the shared folder without entering a username and password.

samba private share with security = user

If you want to allow the user to have write permission on the shared folder, then run the following command to grant read, write and execute permission.

sudo setfacl -R -m u:username:rwx /path/to/the/share/

In my case, I need to run

sudo setfacl -R -m u:demouser:rwx /home/linuxbabe/private/

If you selected allow access to everyone, then you need to grant read, write and execute permission to the nobody user in order to let others change files/folders.

sudo setfacl -R -m u:nobody:rwx /path/to/the/share/

Now all left to do is restart Samba server.

sudo systemctl restart smbd nmbd

Accessing Samba Shared Folder From Windows

On a Windows computer that is in the same network, open File Explorer and click Network on the left pane. Then double-click the hostname of your Ubuntu computer. For example, the hostname of my Ubuntu 16.04 computer is ubuntu.

ubuntu 16.04 system-config-samba

Then double-click the shared folder and enter the Samba username and password.

ubuntu 16.04 samba server share

That’s it! I hope this tutorial helped you use system-config-samba on Ubuntu 16.04. As always, if you found this post useful, then subscribe to our free newsletter to get more tips and tricks.

Rate this tutorial
[Total: 20 Average: 4.2]

6 Responses to “How to Use System-Config-Samba on Ubuntu 16.04

  • cauchy2k
    6 years ago

    Great article! Very helpful for me.

  • 林承冠
    6 years ago

    It’s useful. Thanks for your sharing.

  • thank you help me a lot ….

  • Khushal Singh
    4 years ago

    it’s very useful and simple to understand the process. Great Post

  • Jonathan Gossage
    4 years ago

    This article appears to be obsolete on Ubuntu 20.04 as system-config-samba cannot be installed with apt.

Leave a Comment

  • Comments with links are moderated by admin before published.
  • Your email address will not be published.
  • Use <pre> ... </pre> HTML tag to quote the output from your terminal/console.
  • Please use the community (https://community.linuxbabe.com) for questions unrelated to this article.
  • I don't have time to answer every question. Making a donation would incentivize me to spend more time answering questions.

The maximum upload file size: 2 MB. You can upload: image. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop file here