How to Install and Configure Samba SWAT on CentOS 5.5

SWATSWAT is the Samba Web Administration Tool that enable us to configure Samba from Web browser. In this post i will show simple steps to get Samba SWAT running on your CentOS 5.5 server. With SWAT, you can easily manage your samba server without messing with command line. You just need to install xinetd first, and then proceed to install samba-SWAT.

1. Install xinetd

    [root@server ~]# yum -y install xinetd
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * addons: ossm.utm.my
     * base: ossm.utm.my
     * epel: mirror01.idc.hinet.net
     * extras: ossm.utm.my
     * updates: ossm.utm.my
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package xinetd.i386 2:2.3.14-10.el5 set to be updated
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ==========================================================================================
     Package            Arch             Version                       Repository        Size
    ==========================================================================================
    Installing:
     xinetd             i386             2:2.3.14-10.el5               base             124 k
    
    Transaction Summary
    ==========================================================================================
    Install       1 Package(s)
    Upgrade       0 Package(s)
    
    Total download size: 124 k
    Downloading Packages:
    xinetd-2.3.14-10.el5.i386.rpm                                      | 124 kB     00:02
    Running rpm_check_debug
    Running Transaction Test
    Finished Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Installing     : xinetd                                                             1/1
    
    Installed:
      xinetd.i386 2:2.3.14-10.el5
    
    Complete!
    

2. Start xinetd

    [root@server ~]# /etc/rc.d/init.d/xinetd start
    Starting xinetd:                                           [  OK  ]
    

3. Install SWAT

    [root@server ~]# yum -y install samba-swat
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * addons: ossm.utm.my
     * base: ossm.utm.my
     * epel: mirror01.idc.hinet.net
     * extras: ossm.utm.my
     * updates: ossm.utm.my
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package samba-swat.i386 0:3.0.33-3.29.el5_6.2 set to be updated
    --> Processing Dependency: samba = 3.0.33-3.29.el5_6.2 for package: samba-swat
    --> Running transaction check
    ---> Package samba.i386 0:3.0.33-3.29.el5_6.2 set to be updated
    --> Processing Dependency: samba-common = 3.0.33-3.29.el5_6.2 for package: samba
    --> Running transaction check
    ---> Package samba-common.i386 0:3.0.33-3.29.el5_6.2 set to be updated
    --> Processing Dependency: libsmbclient = 3.0.33-3.29.el5_6.2 for package: samba-common
    --> Running transaction check
    ---> Package libsmbclient.i386 0:3.0.33-3.29.el5_6.2 set to be updated
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ==========================================================================================
     Package               Arch          Version                       Repository        Size
    ==========================================================================================
    Installing:
     samba-swat            i386          3.0.33-3.29.el5_6.2           updates          8.2 M
    Installing for dependencies:
     samba                 i386          3.0.33-3.29.el5_6.2           updates           16 M
    Updating for dependencies:
     libsmbclient          i386          3.0.33-3.29.el5_6.2           updates          908 k
     samba-common          i386          3.0.33-3.29.el5_6.2           updates          6.7 M
    
    Transaction Summary
    ==========================================================================================
    Install       2 Package(s)
    Upgrade       2 Package(s)
    
    Total download size: 32 M
    Downloading Packages:
    (1/4): libsmbclient-3.0.33-3.29.el5_6.2.i386.rpm                   | 908 kB     00:16
    (2/4): samba-common-3.0.33-3.29.el5_6.2.i386.rpm                   | 6.7 MB     02:01
    (3/4): samba-swat-3.0.33-3.29.el5_6.2.i386.rpm                     | 8.2 MB     02:28
    (4/4): samba-3.0.33-3.29.el5_6.2.i386.rpm                          |  16 MB     05:11
    ------------------------------------------------------------------------------------------
    Total                                                      55 kB/s |  32 MB     09:59
    Running rpm_check_debug
    Running Transaction Test
    Finished Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Updating       : libsmbclient                                                       1/6
      Updating       : samba-common                                                       2/6
      Installing     : samba                                                              3/6
      Installing     : samba-swat                                                         4/6
      Cleanup        : libsmbclient                                                       5/6
      Cleanup        : samba-common                                                       6/6
    
    Installed:
      samba-swat.i386 0:3.0.33-3.29.el5_6.2
    
    Dependency Installed:
      samba.i386 0:3.0.33-3.29.el5_6.2
    
    Dependency Updated:
      libsmbclient.i386 0:3.0.33-3.29.el5_6.2     samba-common.i386 0:3.0.33-3.29.el5_6.2
    
    Complete!
    

4. Configure swat as below. Change Line 10 and 14 only.

    [root@server ~]# vi /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
            wait            = no
            only_from       = 127.0.0.1 192.168.2.0/16
            user            = root
            server          = /usr/sbin/swat
            log_on_failure  += USERID
            disable         = no
    }
    

5. Restart xinetd

    [root@server ~]# /etc/rc.d/init.d/xinetd restart
    Stopping xinetd:                                           [  OK  ]
    Starting xinetd:                                           [  OK  ]
    

How to Reset the Directory Manager Password on RHEL 7 / CentOS 7
How to Reset the Directory Manager Password on RHEL 7 / CentOS 7

It is best practice to remember passwords, but because too many passwords, sometimes we forget. We are not encouraged to write the password on any paper or share the password...

How to Find Big Files Size on Linux RHEL/CentOS
How to Find Big Files Size on Linux RHEL/CentOS

As the linux administrator, sometimes we have to identify which files are most take much space in the linux server resulting in low free space. Low disk space can also...

Why Linux users should worry about malware and what they can do about it
Why Linux users should worry about malware and what they can do about it

Don’t drop your guard just because you’re running Linux. Preventing the spread of malware and/or dealing with the consequences of infection are a fact of life when using computers. If...

How to Reset Forgotten Root Password on Linux RHEL 7/CentOS 7
How to Reset Forgotten Root Password on Linux RHEL 7/CentOS 7

This article will explain the steps to reset a lost root password or to reset forgotten root password on Linux RHEL 7 or CentOS 7. Basically, the steps will adding...

How to Update CentOS or Upgrade CentOS to the Latest Version
How to Update CentOS or Upgrade CentOS to the Latest Version

Recently, the latest version of CentOS 7.3 was released. All users of CentOS 7.0, 7.1 and 7.2 can upgrade their system to the most recent. This quick guide will explain...

How to Change your WordPress Username, Nickname and Display Name in MySQL
How to Change your WordPress Username, Nickname and Display Name in MySQL

After you create an account log in WordPress, you may want to change your WordPress username, as appropriate or due to security reason. However, you can not do this from...

How to Enable SSH Root Login on Ubuntu 16.04
How to Enable SSH Root Login on Ubuntu 16.04

As what we wrote in the previous article on how to allow SSH root on Ubuntu 14.04, after installing a fresh new copy of Ubuntu 16.04 LTS, we find that...

How to Change UUID of Linux Partition on CentOS 7
How to Change UUID of Linux Partition on CentOS 7

UUID (Universally Unique IDentifier) should be unique and it is used to identify storage devices on a linux system. If you cloned a virtual machine from vCenter, the metadata containing...

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *