Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Samba HowTo Guide
Prev Home Next

Validate SWAT Installation

The very first step that should be taken before attempting to configure a host system for SWAT operation is to check that it is installed. This may seem a trivial point to some, but several Linux distributions do not install SWAT by default, even though they do ship an installable binary support package containing SWAT on the distribution media.

When you have confirmed that SWAT is installed, it is necessary to validate that the installation includes the binary swat file as well as all the supporting text and Web files. A number of operating system distributions in the past have failed to include the necessary support files, even though the swat binary executable file was installed.

Finally, when you are sure that SWAT has been fully installed, please check that SWAT is enabled in the control file for the internetworking super-daemon (inetd or xinetd) that is used on your operating system platform.

Locating the SWAT File

To validate that SWAT is installed, first locate the swat binary file on the system. It may be found under the following directories:

/usr/local/samba/bin the default Samba location
/usr/sbin the default location on most Linux systems
/opt/samba/bin

The actual location is much dependent on the choice of the operating system vendor or as determined by the administrator who compiled and installed Samba.

There are a number of methods that may be used to locate the swat binary file. The following methods may be helpful.

If swat is in your current operating system search path, it will be easy to find it. You can ask what are the command-line options for swat as shown here:

frodo:~ # swat -?
Usage: swat [OPTION...]
  -a, --disable-authentication         Disable authentication (demo mode)

Help options:
  -?, --help                           Show this help message
  --usage                              Display brief usage message

Common samba options:
  -d, --debuglevel=DEBUGLEVEL          Set debug level
  -s, --configfile=CONFIGFILE          Use alternative configuration file
  -l, --log-basename=LOGFILEBASE       Basename for log/debug files
  -V, --version                        Print version

Locating the SWAT Support Files

Now that you have found that swat is in the search path, it is easy to identify where the file is located. Here is another simple way this may be done:

frodo:~ # whereis swat
swat: /usr/sbin/swat /usr/share/man/man8/swat.8.gz

If the above measures fail to locate the swat binary, another approach is needed. The following may be used:

frodo:/ # find / -name swat -print
/etc/xinetd.d/swat
/usr/sbin/swat
/usr/share/samba/swat
frodo:/ #

This list shows that there is a control file for xinetd , the internetwork super-daemon that is installed on this server. The location of the SWAT binary file is /usr/sbin/swat, and the support files for it are located under the directory /usr/share/samba/swat.

We must now check where swat expects to find its support files. This can be done as follows:

frodo:/ # strings /usr/sbin/swat | grep "/swat"
/swat/
...
/usr/share/samba/swat
frodo:/ #

The /usr/share/samba/swat/ entry shown in this listing is the location of the support files. You should verify that the support files exist under this directory. A sample list is as shown:

jht@frodo:/> find /usr/share/samba/swat -print
/usr/share/samba/swat
/usr/share/samba/swat/help
/usr/share/samba/swat/lang
/usr/share/samba/swat/lang/ja
/usr/share/samba/swat/lang/ja/help
/usr/share/samba/swat/lang/ja/help/welcome.html
/usr/share/samba/swat/lang/ja/images
/usr/share/samba/swat/lang/ja/images/home.gif
...
/usr/share/samba/swat/lang/ja/include
/usr/share/samba/swat/lang/ja/include/header.nocss.html
...
/usr/share/samba/swat/lang/tr
/usr/share/samba/swat/lang/tr/help
/usr/share/samba/swat/lang/tr/help/welcome.html
/usr/share/samba/swat/lang/tr/images
/usr/share/samba/swat/lang/tr/images/home.gif
...
/usr/share/samba/swat/lang/tr/include
/usr/share/samba/swat/lang/tr/include/header.html
/usr/share/samba/swat/using_samba
...
/usr/share/samba/swat/images
/usr/share/samba/swat/images/home.gif
...
/usr/share/samba/swat/include
/usr/share/samba/swat/include/footer.html
/usr/share/samba/swat/include/header.html
jht@frodo:/>

If the files needed are not available, it is necessary to obtain and install them before SWAT can be used.

Samba HowTo Guide
Prev Home Next

 
 
  Published under the terms fo the GNU General Public License Design by Interspire