Saturday, January 2, 2010

Howto:Install & Configure SWAT

In this article I will demonstrate how to install SWAT on Ubuntu Linux (the tutorial is good for almost any other Linux distro). I come out of conclusion that samba service is already installed so I will focus more on SWAT.
SWAT is a great GUI managment tool that allows us to manage Samba services via user friendly web-interface, the latest version of SWAT is very dynamic and includes many great options (such as LDAP,Kerberos,Domain Controller authentication and many more) for smooth intergration with Windows based environment.

First install SWAT with:

apt-get install swat

Next, verify SWAT installation:

I suggest to configure SWAT via Xinet.d deamon, all you have to do is create an apropriate file with xinetd rules:

touch /etc/xinetd.d/swat

vi /etc/xinetd.d/swat

This is how the configuration file will look like (in general):

As you can see, we allowed access from localhost, and the port that will be bound to SWAT service is port 901 tcp.
It will be a good idea to restart xinetd service so the changes take place:
/etc/init.d/xinetd restart
Now, verify that xinetd is running and the port is bound to SWAT:

We are almost there, if you have firewall set a propriate rule and allow traffic to port 901 (localhost).
Try accessing the GUI via the your browser:
*note if you're asked for password you should add a samba administrator via:
smbpasswd -a samba_admin

Works like magic, from here you can perform any needed Samba related administration tasks.

No comments: