Installation Guide for NMW System

This is a description of the compilation and installation process. The NMW System has been confirmed to work in SunOS 4.1.3, NEWS-OS 4.2.1R, BSD/OS 1.1, 2.0, and FreeBSD.

An outline of this installation guide is as follows.

  1. What this package contains
  2. Before installing
  3. Compilation
  4. Installation
  5. Test

What this package contains

Please confirm that the following is included in the package.
nmw-1.0a/INSTALL
Installation guide(contents similar to this page)
nmw-1.0a/Makefile.root
Makefile.root for installation from root
nmw-1.0a/Makefile.nonroot
Makefile for installation from non-root
nmw-1.0a/README.1st
Read this document first
nmw-1.0a/etc/
Directory containing wsd.conf samples
nmw-1.0a/owl/
Library directory for OWL
nmw-1.0a/samples/
Directory containing worm samples
nmw-1.0a/src/
Directory containing source code files

Before installing

Read README

Before you continue with this page, read README(or README.1st). It contains an introduction to the NMW System and a description of the contents of this package.

Confirmation of scm, perl

Please confirm that scm and perl has been installed. The abovementioned programs are required for the NMW System. Please refer to the respective documents concerning the installation of scm and perl. This software has been confirmed to work with scm v4e0, v4e1 and perl v4.0.

Defining the user and group

It is required to define the nmw user and the group the nmw user belongs to. Please do so before installing. Groups already in existence may be used as they are.

For example, a password entry may be as follows.


nmw:*:4646:30::0:0:Pseudo User for NMW System:/home/
nmw:/bin/csh
       

Please define appropriate user ID and group ID(the numbers in the above example have no special meaning). The group need not be a wheel group, but password definition is necessary. However, the abovementioned definitions are not necessary for installation from non-root authority.

In addition, although the usual method for installing the NMW System requires root authority, there is a way of installing not not using root authority. However, the security issues concerning the present NMW System are still in the experimental stage, therefore, extra caution is required concerning security issues under general user authority.


Compilation

Makefile

First, copy Makefile with the following commands at the main directory of the package.
Installing from root     :  % cp Makefile.root Makefile
Installing from non-root :  % cp Makefile.nonroot Makefile
Next, edit lines 14 to 27 of Makefile(lines 15 to 30 for installation from non-root) as shown below.

[Installing from root]

------------------------------------------------------------------
CC           : defining the C compiler
MAKE	       : defining the make program
BINDIR       : directory containing wsd, wormc

NMWDIR       : directory containing wsd log file, output result
NMWTMP       : directory containing temoporary files for wsd etc
CONFDIR      : directory containing wsd.conf
OWLLIBDIR    : directory containing OWL library files
OWLBINDIR    : directory contaning scm
OWL_EXECPATH : command pathname for OWL 

NMWUSER      : user names for NMW System
NMWGROUP     : group name for NMW System

SCMLIBDIR    : directory containing pre-installed library for scm 

-------------------------------------------------------------------
The directory defined by NMWDIR, NMWTMP, CONFDIR, OWLLIBDIR, OWL_EXECPATH is the working directory of the NMW System. Therefore, there is no need to define the working directory for the respective machines connected. However, installation at a disk mounted by several machines should be avoided. Installation should be done at a machine's local disk unless under special circumstances. As a result, the directory specified by NMWDIR, NMWTMP, CONFDIR, OWLLIBDIR, OWL_EXECPATH should be at the local disk.

OWL_EXECPATH defines the directory containing the executable commands by OWL. It is specified in the same manner as the PATH environment variable of the UNIX Shell program "sh". In addition, due to the fact that the standard commands executable by OWL is installed at the directory $(OWLLIBDIR)/bin when at installation, this directory is included in OWL_EXECPATH. If OWL_EXECPATH is not defined, OWL is not able to read external commands.

NMWUSER, NMWGROUP states the user name and the user group of the NMW System. Please specify the user name in NMWUSER and the user group in NMWGROUP.

SCMLIBDIR specifies the directory containing the files read by the pre-installed scm when started up. The NMW System creates the scm startup files for the system based on the files in this directory at installation. Please check that this directory contains the files Init.scm and Transcen.scm.

[Installing from non-root]

----------------------------------------------------------
HOME	  : Directory to install the NMW System
NMWUSER   : User name of user installing
NMWGROUP  : Group name of user installing

The rest is similar to [Installing from root].
------------------------------------------------------------
[Installing from non-root] is done at a directory which a non-root user has permission to write. Examples of such a directory are the temporry directory or the home directory of the user. The directory is specified by the HOME macro in Makefile. For example, when installing at the directory /usr/tmp, specifiy
HOME = /usr/tmp
Please also refer to [Installing from root]. It is not advisable to install at the home directory when the directory is mounted from several machines because the specifications required by wsd cannot be made.

make

Please execute the following make commands for each respective OS.
SunOS 4.1.3        % make OS=SUN4
NEWS-OS 4.2.1R     % make OS=NEWS
BSD/OS 1.1         % gmake OS=BSDOS1
BSD/OS 2.0         % gmake OS=BSDOS2
FreeBSD 2.0        % make OS=FreeBSD2
For example, for SunOS, enter
% make OS=SUN4
Please use the same make as the one specified by Makefile.


Installation

Copying the required files

For [Installing from root], please enter the command shown below. (For [Installing from non-root], root authority is not required)
% make install
The following is done with the above command.

If you will like to confirm the above, please enter the command shown below.

% make -n install

Specifying the port

Next, the communication port for the NMW System is to be specified. Add this line to the file /etc/services.(Although the NMW System works even without this step, please add this line to ensure that the system works normally)
wsd      6464/tcp     # for Worm Support Daemon (NMW)
The port number is specified by nmw.h. Please alter nmw.h and recompile if it is necessary to make alterations to the port.

Specification for wsd.conf

Please refer to README.wsdconf and edit the file /etc/wsd.conf which is read by wsd when started up. (For installation from non-root, the file is $(HOME)/nmw/etc/wsd.conf)

Test

Testing the NMW-System.

Specification for wsd.conf

To facilitate explanation, the following network is assumed.
     kuro	mike   nora
     |	 |	|	
     o------+------+------+-----o animal-network
     |                  xxx.xxx.xxx.xxx
     pochi                255.255.255.zzz
     |
     o----+----+---+-------+----o vehicle-network
     |        |       |      yyy.yyy.yyy.yyy
     car	bus   bicycle   255.255.255.www
     
In this diagram, the animal-network and the vehicle-network is connected by the gateway pochi.

When introducing the NMW System into all the 7 hosts in the above diagram, it is necessary to check that wsd works in all the hosts.

The wsd.conf of pochi is as follows.

: animal-network xxx.xxx.xxx.xxx 255.255.255.zzz
kuro
mike
nora
: vehicle-network yyy.yyy.yyy.yyy 255.255.255.www
car
bus
bicycle
Similarly, it is necessary to prepare for other hosts connected at wsd.conf. Please state the specifications accordingly.

Execution of wsd

Next, the NMW System is started up. Please execute wsd at root or nmw user.
% wsd
For non-root installation, run the program under normal user authority.

Execute the following command at host pochi(not necessary for non-root installation) to send the worm to check the processes running at the respective hosts.

% /usr/sbin/wormc -worm /usr/local/lib/owl/sample/ps.owl
wormc is the command for sending the worm to the wsd of the local host. It can be executed as follows.

wormc -worm [worm filename]

wsd executes the received worm. In this case, the worm is released to the neighbouring hosts. The worm is sent to each of the hosts and is executed (in this case the command ps which investigates the processes running) and is sent back carrying the execution result from each host.

When the wsd of pochi receives the worm carrying the results, the results are written in a file in the directory specified by NMWDIR at installation. (The default file is /var/nmw/result or /usr/tmp/lib/nmw/result). In this example, pochi sent a worm to six hosts and therefore six result files can be expected. Please check that the files exist as a test to ensure that there are no problems installing. The log files /var/nmw/log/wsd.log or ~/lib/nmw/log/wsd.log should also have been created.

In addition, in the directory /usr/local/lib/owl there should be several worm samples already installed. Please refer to the following files for more details.

/usr/local/lib/owl/samples/README.samples
(For non-root installation, /usr/tmp/nmw/lib/owl/samples/
README.samples etc.)

To NMW System Beta-Version Home Page


Chee How KEK (kek@is.titech.ac.jp)