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
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
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.
Run the following command to install it.
sudo apt install system-config-samba
Then we can start it from command line.
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.
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.
Next, we also need to set a separate Samba password for the user.
sudo smbpasswd -a username
Now in the Samba GUI, click
Server Settings menu. Make sure the value of
workgroup is the same with the workgroup settings of Windows computers.
You can find the workgroup setting on your Windows computer by going to
Control Panel >
System and Security >
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)
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.
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
Then double-click the shared folder and enter the Samba username and password.
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: 18 Average: 3.7]