Samba SWAT (Samba Web Administration Tool) is a powerful tool that allows you to configure your Samba server via a web browser. This eliminates the need for command line configurations, making the process more accessible and manageable.
In this guide, we will walk you through the steps to install and configure Samba SWAT on your CentOS 5.5 server. Before we begin, it’s important to note that you will need to install xinetd first, and then proceed to install Samba SWAT.
If you’re interested in learning more about different web servers, you can check out this article on the best web servers.
Step 1: Install xinetd
The first step in this process is to install xinetd. This can be done by running the following command:
yum -y install xinetd
This command will install xinetd on your server. You will see a series of messages as the system resolves dependencies, downloads the package, and completes the installation.
[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!
Step 2: Start xinetd
After installing xinetd, you need to start it. This can be done by running the following command:
/etc/rc.d/init.d/xinetd start
You should see a message indicating that xinetd has started successfully.
Step 3: Install SWAT
With xinetd installed and running, you can now proceed to install Samba SWAT. This can be done by running the following command:
yum -y install samba-swat
This command will install Samba SWAT on your server. As with the installation of xinetd, you will see a series of messages as the system resolves dependencies, downloads the package, and completes the installation.
[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!
Step 4: Configure SWAT
After installing Samba SWAT, you need to configure it. This involves editing a configuration file. You can do this by running the following command:
vi /etc/xinetd.d/swat
In the configuration file, you need to change lines 10 and 14. The configuration should look like this:
# 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 }
Step 5: Restart xinetd
After configuring Samba SWAT, you need to restart xinetd for the changes to take effect. This can be done by running the following command:
/etc/rc.d/init.d/xinetd restart
You should see a message indicating that xinetd has restarted successfully.
[root@server ~]# /etc/rc.d/init.d/xinetd restart Stopping xinetd: [ OK ] Starting xinetd: [ OK ]
Commands Mentioned
- yum -y install xinetd – This command installs xinetd on your server.
- /etc/rc.d/init.d/xinetd start – This command starts xinetd.
- yum -y install samba-swat – This command installsSamba SWAT on your server.
- vi /etc/xinetd.d/swat – This command opens the SWAT configuration file for editing.
- /etc/rc.d/init.d/xinetd restart – This command restarts xinetd.
Conclusion
In this guide, we have walked through the process of installing and configuring Samba SWAT on a CentOS 5.5 server. By following these steps, you can easily set up and manage your Samba server without having to deal with command line configurations.
Remember, before you can install Samba SWAT, you need to install xinetd first. Once both are installed, you can configure Samba SWAT and restart xinetd to apply the changes.
If you’re interested in learning more about different types of servers, you can check out these articles on Apache,
Remember, the key to successful server management is understanding the tools at your disposal and how to use them effectively. Samba SWAT is one such tool that can make the task of managing your Samba server much easier. Happy server managing!
FAQs
-
What is Samba SWAT?
Samba SWAT (Samba Web Administration Tool) is a user-friendly tool that allows you to configure your Samba server via a web browser, eliminating the need for command line configurations.
-
Why do I need to install xinetd before installing Samba SWAT?
xinetd is a super-server daemon that provides access control, logging, and other features, and is required for Samba SWAT to function correctly.
-
How do I start xinetd?
You can start xinetd by running the command ‘/etc/rc.d/init.d/xinetd start’ on your server.
-
What changes do I need to make in the SWAT configuration file?
In the SWAT configuration file, you need to change lines 10 and 14 to configure the ‘only_from’ and ‘server’ parameters, respectively.
-
How do I restart xinetd?
You can restart xinetd by running the command ‘/etc/rc.d/init.d/xinetd restart’ on your server.
1 Comment
Thanks for this – Great