Configure Samba with Gadmin-Samba
For those new to Samba, the configuration of this provider of seamless file and print services to SMB/CIFS clientsÂ can sometimes be a nightmare. Not only are you dealing with tricky configuration files, you also have to worry about getting users added to encrypted password files. Of course if you want to tackle this the old-school way you can take a read of my article "Set up your new Ubuntu server as a Samba server". But for those that prefer to do things the GUI way, there are plenty of tools available for you as well.
One such tool is the gadmin-samba tool from the Gadmintools suite of GUI Linux administration tools. The Gadmintools suite allows you to easily setup Samba with the help of a well thought-out graphical interface. With this tool you should be able to have Samba up and running in no time. Of course, there is a bit of installation to tackle at first, but even that is simple. So, without further adieu, let's get to work.
You can do this two ways:
- Install the entire Gadmin suite of tools.
- Install only the Samba tool.
You will also need to make sure Samba is installed as well as winbind. So open up Synaptic and search for the following:
Mark each of those for installation and they should pick up all of the necessary dependencies. Once installed, you are ready to rock.
To start the tool go to the System Tools sub-menu of the Applications menu and select Gadmin Samba. You will have to enter your sudo (or root user - depending upon your distribution) password. The main window will open with no configuration settings filled in (see Figure 1).
I will go through the setup one tab at a time.
Although there are numerous settings to configure, you really only need configure a few of these to get a basic Samba server up and running.
- The servers host name: This is actually the Netbios name as configured in smb.conf.
- Workgroup: The workgroup your Samba server will be a part of.
- Security level: Setting this according to your needs (I prefer users on a smaller network).
- Allowed hosts and networks: Set this to eth0 lo (you might have to modify eth0 to reflect your network device name).
That's it for this tab. Now we move on to the users tab.
The Users tab is exactly what you would expect - a means to set up users for your Samba share. This section takes the place of having to use the smbpasswd command. From this tab (see Figure 2) you will need to fill out:
- Username: The name of the user.
- Password: The password for the user.
- Group: You must add your user to a group. You can safely add your user to the same name as the username. So if your username is joe, you can add this user to the joe group.
- Comment: For some odd reason, comments are required.
- Home directory. Set this to the users' home directory.
- Shell: Most likely this will be /bin/sh
After you fill out this information click the Apply button. You are now ready to move on to the Shares tab.
When you click on the Shares tab you might be surprised to see some default values in place. If not, don't worry, this is simple. Just configure the following:
- Share name: The name of the share you want to create.
- Shared directory: The directory you want to share out. By default, Gadmin Samba will want to share out /opt/samba. This is fine if you like, but you must remember that your normal users will not have write permission to this directory. That's okay, you can add users to this directory by scrolling down and clicking the "Add access permissions" button and walking through the wizard. Just use caution with this. If you add users to the share, only those users will have access to the share. This is good security, but you must remember to add new users to this share should new users need access.
Once you have configured your users, you can click on the Configuration tab to see what your /etc/samba/smb.conf file will look like and click the Save button should it suffice. Once you have saved your configuration file, click the Activate button and Samba will up and running, ready for your users to connect.
The Gadmintools Samba GUI has taken the complexity out of setting up a Samba server. Give this tool a try and see if you can't get your Samba server up and running faster and with less hair pulling than you ever did with your manual setups.Advertisement