Configure Samba with Gadmin-Samba - gHacks Tech News

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.

Installation

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:

  • samba
  • winbind
  • gadmin-samba

Mark each of those for installation and they should pick up all of the necessary dependencies. Once installed, you are ready to rock.

Running Gadmin-Samba

Figure 1

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.

Server settings

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.

Users

Figure 2

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.

Shares

Figure 3

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.

Final thoughts

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.





  • We need your help

    Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

    We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats (video ads) or subscription fees.

    If you like our content, and would like to help, please consider making a contribution:

    Comments

    1. areader said on December 29, 2009 at 6:39 pm
      Reply

      dude, “adieu” means “farewell.” Maybe you should write an article on why spellcheckers don’t replace knowledge? Nearly every article you write has a funny homonym or two– is this some on-purpose sly humor? Or the death knoll for good spelling and grammar?

    2. Piers said on July 23, 2010 at 2:33 pm
      Reply

      Well all I can say is that, never mind the spelling and grammar, this guide is for a older version of Gadmin-Samba and as hard as I am trying, I cannot get the thing to work! It has messed up my network settings and the most frustrating thing is that the instructions are as clear as mud! They assume that the person following them knows things that have not been explained in the “tutorial” or whatever you would like to call it!

      Apologies if I come across as slightly pissed-off, but in truth I am!
      Thanks, …. I think!

    3. athan said on May 19, 2014 at 9:30 am
      Reply

      hi, thanks for the article,
      is there a way to make the gadmin samba tool startup with linux? that is the one major issue i have especially when power cuts and my users are stuck.

    4. Christophe Maggi said on November 29, 2014 at 9:37 pm
      Reply

      Hello,
      Nice article.
      Same question as athan : how to launch samba tool startup with debian ?
      Other question : Is it possible to save all configurations of all shares and users to replace without rewrite all it if system fails ?

    5. John Capell said on July 15, 2015 at 11:54 pm
      Reply

      I have been using SAMBA for about 6 years. With the recent upgrade to DEBIAN 8, I found that the older methods of a config.master and my shell scripts for using the SAMBA-supplied program testparm to build the smb.conf file and the restart of SAMBA via the HUP line command no longer worked. I started experimenting with GADMIN-SAMBA and after several hours had it working. (Part of my home network are machines that require the winbindd daemon.) This “several hours” is in comparison with several weeks for modifying the config file directly. My only complaint with GADMIN_SAMBA is that it is not well documented!

      A retired software engineer.

    Leave a Reply