How to Install and Configure SWAT (Samba Web Administration Tool) In Ubuntu Server 12.04

SWAT (Samba Web Administration Tool) is an simple web-based configuration application allow you to configure and manage the samba configuration file (smb.conf) via web browser. this is a GUI utility for configuring Samba, and it can be very helpful for new Ubuntu administrators who need to get Samba up and running quickly.

On Ubuntu Server 12.04 LTS, SWAT package installation is available in official ubuntu repository. So, if you install Samba Server, SWAT is automatically installed as well. When you install some Linux distributions, you need to option to select packages and then make sure you choose to install the SWAT package installation.

Follow the guide How to install and Configure Samba Web Administration Tool in Ubuntu Server 12.04

Install and Configure Samba Web Administration Tool

Login on your ubuntu server machine via ssh, install samba, swat and  xinetd

sudo apt-get instal samba smbfs samba-doc swat xinetd

Enable service SWAT in /etc/xinetd.conf and restart with the new configuration.

sudo update-inetd --enable 'swat'
sudo dpkg-reconfigure xinetd

Create new configuration file /etc/xinetd/swat:

sudo cat > /etc/xinetd/swat <<-EOF
# 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

Change the permissions smb.conf to group administrator (adm).  use ‘chmod’ and ‘chgrp’ tools to change the file access permissions and group permissions respectively:

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

Restart service xinetd with following command:

sudo /etc/init.d/xinetd restart


sudo service xinetd restart

From a different client on your network,open your web browser and access http://samba_server:[port] ex (  If successful, you will be presented with a dialog box asking for username and password. Use the username and a password from the admin group to log in, and you’ll have access to SWAT.

Link Reference:

Tags: #Administration #Samba Server #SWAT #Ubuntu Server 12.04

How to Upgrade Ubuntu Server 12.04 to Ubuntu Server 14.04 LTS
How to Upgrade Ubuntu Server 12.04 to Ubuntu Server 14.04 LTS
This tutorial will describes how to upgrade
How to Setup OwnCloud Server 5 with SSL Connection
How to Setup OwnCloud Server 5 with SSL Connection
Today ownCloud is the best cloud storage
Must read×