Tuesday, March 20, 2012

Configuring samba swat in linux

Advertisements

Samba is a linux software helps to transfer files between a linux box and windows box. Using NFS you can share files between two linux systems, but not with a linux system and windows system. Using WinSCP you can transfer files between linux and windows. But it is very slow and very time consuming. Samba is fast. Samba-swat is a web interface (or samba web administration tool) for samba. Using samba swat, one can configure samba, define shares, configure printers, edit smb.conf parameters, we status of the samba services, stop and restart services, view the current samba configuration and even change passwords and add samba users. This blog post tutorial explains how to install and configure samba swat in centos linux.



Install samba swat as
#yum install samba-swat

Edit and change the xinetd configuration file for samba
[root@server ~]# cat /etc/xinetd.d/swat
# 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 //means tcp based
        wait            = no
        only_from       = 127.0.0.1 192.168.137.1 //If not commented can be accessible only from localhost. increase security. or you can add hosts ips.
        user            = root //In order to bind privillaged port 901
        server          = /usr/sbin/swat
        log_on_failure  += USERID
        disable         = no        //Change the 'yes' to 'no'.
}
[root@server ~]#

Now restart xinetd service
#service xinetd restart

Take any browser and give following url in address bar.
http://IP_of_samba_server:port_number_of_swat[901]
http://192.168.0.100:901

No comments:

Post a Comment

Be nice. That's all.