Chances are one or more of your data center servers will be used to share out files and folders. If you make use of Linux in that data center, the likelihood of Samba being the underlying technology for sharing out that data is fairly high. Should those Linux servers include a GUI, you don’t have to worry about configuring those Samba shares by hand. Why? Because there’s a very handy GUI tool that makes this process so much easier. Although I do recommend every administrator understand how to create shares via the /etc/samba/smb.conf file, having a GUI tool for that purpose brings a level of efficiency to the task you might need (especially when you’re dealing with a large data center and a lot of shares).
I want to walk through the process of installing and using one such GUI. Said tool is system-config-samba. This tool is available for most Linux distributions. I will be demonstrating the installation process on Ubuntu-derivative, Elementary OS. Once installed, the process for using the tool is the same, regardless of distribution. With this tool installed, you’ll be sharing out your Linux server directories to Windows and macOS machines with ease.
The installation of system-config-samba is quite simple. Open up a terminal and issue the following command:
sudo apt install system-config-samba
When the installation completes, you’ll need to take care of one issue. For some reason, system-config-samba depends upon the file /etc/libuser.conf. However, that file won’t exist prior to installing system-config-samba and the installation doesn’t add that file. To resolve the problem, issue the command:
sudo touch /etc/libuser.conf
You don’t need to add any content to the file, it just needs to exist.
With the tool installed, you can fire it up by opening your desktop menu and searching for Samba. Click on that entry and when prompted type your sudo password. If you don’t see the entry in the menu, you can start the tool by issuing the command sudo system-config-samba. When the application opens, you will see any previously configured shares listed (Figure A).
To create a new share, click the + button. In the resulting window ( Figure B), either type in the path to the directory to be shared, or click the Browse button and locate the directory. Next give the share a name, a description, and select if the share is writeable or visible.
Before you click OK, make sure to click the Access tab. In this section ( Figure C), you can define who has access to the share. You can select from the users listed or give access to everyone.
If you see no users listed, that means no users have been added to Samba. Normally you’d need to drop to the command line to fix this. However, with system-config-samba comes a GUI that allows you to add users to Samba and set up a password for them. Back at the main system-config-samba window, click Preferences | Samba Users. In the resulting window ( Figure D), select the user from the drop-down (the user must already exist on the system), type a Windows username, type and confirm a password, and then click OK.
At this point, that user will now be available in the Access tab for a share. You can select the user to give them access to the newly created share.
Samba sharing made easy
Sharing out directories with Samba doesn’t get much easier. If you’ve been struggling with getting Samba shares to work, give this handy GUI tool a try and see if it doesn’t solve your problems.