Install SWAT (Samba Web Configuration Tool) On Linux Mint 12

It’s relatively easy to configure Samba using command-line tools and by editing the /etc/samba/smb.conf file. However, the learning curve is rather sharp. If you want a more graphical interface, there’s a program called SWAT, the Samba Web Administration Tool. SWAT allows you to administer your Samba server through a web interface. SWAT is a fairly complicated program to install on Linux Mint 12, but once you have it up and running, it’s quite simple to use.

First, you’ll need to have Samba installed before you can install SWAT.

Once you have Samba installed, you’ll need to pick an account that is a member of the local admin group, since you’ll need an account with admin-level permissions to use all of SWAT’s functions (otherwise you’ll only see status pages, and will be unable to change any settings). The default account you created during the installation of Ubuntu belongs to the local admin group, so that account will work. Make sure the admin group has permission to the /etc/samba/smb.conf file with these commands:

sudo chmod g+w /etc/samba/smb.conf

sudo chgrp adm /etc/samba/smb.conf

Next, install both SWAT and the inetd Internet superserver, which is required for SWAT to run properly (inetd is sort of a “super-process” that can control and call lesser processes):

sudo apt-get install swat xinetd

This will install SWAT and the inetd superserver, and their dependencies. Once the installation has finished, you’ll need to create a configuration file for SWAT in the /etc/xinetd.d directory. Fortunately, you can do that quite handily with vi:

sudo vi /etc/xinetd.d/swat

Once you’re in the swat file, switch vi to Insert mode add this text:

# default: off

# description: SWAT is the Samba Web Admin Tool. Use swat \

# to configure your Samba server. To use SWAT, \

# connect to port 901 with your favorite web browser.

service swat


port = 901

socket_type = stream

wait = no

# Use only_from if you want to restrict access

# only_from = localhost

user = root

server = /usr/sbin/swat

log_on_failure += USERID

disable = no


Note that there must be a space before and after the equal signs.

After you’ve added the text, switch back to Command mode, save the file, exit vi, and use this command to restart the inetd server:

sudo /etc/init.d/xinetd restart

From a different client on your network, fire up a web browser. Assuming your Samba server has an IP address of, you can access SWAT here:

Enter a username and a password from the admin group, and you’ll have access to SWAT.

Note that SWAT also includes all of Samba’s man pages in easily-read web page format.


Buy at, Amazon UK, Barnes & Noble, and Smashwords.

This entry was posted in Linux Mint 12. Bookmark the permalink.

2 Responses to Install SWAT (Samba Web Configuration Tool) On Linux Mint 12

  1. Dark Rider says:

    So, o.k… you’ve told me how to install swat for use with samba but you stopped there. You should now go on to tell me exactly how to use swat to configure samba or your above info does me no good.

    You could have at least made another tutorial on how to use swat and put a link to it at the bottom. You left the job half done.

    Your tutorial doesnt work anyway. Linux writers all seem to make the big mistake that linux newbies know more than they do. You dont explain things very well. I cant get passed this point : “Fortunately, you can do that quite handily with vi:

    sudo vi /etc/xinetd.d/swat

    Once you’re in the swat file, switch vi to Insert mode add this text:”

    Whats vi and how do i use it? I dont see anything like that in the command bar of the Terminal. I have typed ” sudo vi /etc/xinetd.d/swat” but I have no idea how to “switch vi to Insert mode add this text”

    Linux writers, you MUST spell out Everything in detail so any one can follow the tutorial even if this is the first time the ever booted into a linux distro. This is what makes people hate linux.

  2. Jacques Renaud says:

    Dear Jonathan,

    (Sorry I am not expert in English)

    I wish you an happy new year.

    You told us almost all what we need, almost, only. So I needed to search, to move my … a little (RTFM). And when I move it a little I feel I am alive, almost clever. Thanks.

    So I asked to my friend (google) – Whats vi? (Did you mean: what’s vi?). I managed to open the second link ( and I found at the end another link – vi lovers home page ( : nice.

    I ask to my friend – command vi. This is incredible, so much people are writing so nicely about vi, explaining all, almost all.

    Due to nice people who are explaining all, almost all what we need, I feel something strange : my brain is no more a too much boiled potatoe, it is like a flower tree in spring. This the reason I love Linux and people like you.