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.
- How to connect to Linux Samba shares from Windows 10 (TechRepublic)
- How to set up quick and easy file sharing with Samba (TechRepublic)
- How to set up Samba shares for groups (TechRepublic)
- How to configure Ubuntu Linux server as a Domain Controller with samba-tool (TechRepublic)
- Samba critical flaws: Patch now but older open instances have 'far worse issues' (ZDNet)
Jack Wallen is an award-winning writer for TechRepublic and Linux.com. He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website jackwallen.com.