README fr timesynchro
======================

Introduction:
-----------

The time setting on a computer should always be as exact as possible.
That's why:
The time should be set to GMT in the BIOS and by the variable TIMEZONE in the
operating system.

Why?
All computers in the internet operate according to the same basis of time (GMT).
Otherwhise it would be impossible to get any reasonable information about the
time order, for example when messages are sent.

An example:
Each server an e-mail went through is written into in the header together with
a time entry.
If an e-mail came from a time zone which is more eastern than the own location
and if the time on the e-mail relays did not run on the basis of GMT, according
to the time entry the e-mail would come from the future.

Basic knowledge:
----------------

There are different protocols in order to coordinate the time setting of one
computer to another one. 

In this case the time protokol (ARPA Internet RFC 868) is used with the command
netdate. For more information about the command 'netdate' enter 'man netdate'.

The server expects a request on port 37, either by upd or by tcp.
In the case you want tu run a time server, please, check the settings of the
firewall in order to permit this port in the relevant protocols.
Furthermore it might be neccessary to activate one or two  inaktive entrys in
the /etc/inetd.conf:

---------------------------------schnipp---------------------------------------
time	stream	tcp	nowait	root	internal
time	dgram	udp	wait	root	internal
---------------------------------schnapp---------------------------------------

Consequently it would also be possible that a computer in a company "acts" like
a time server and coordinates its settings with another computer in the
internet.
Here any number of servers can be requested. The program 'netdate' will ensure
that only plausible times are accepted.

For an unix client you can also use this program or simply enter
'netdate <protocol> <servername>' as root.
For a windows client you can use e.g. the program 'automachron'. Download from
http://www.onguycoding.com/automachron.

Instructions:
-------------

Our program 'timesynchro' allows the installation for the coordination with
other time servers.

It is divided into several items:
- Displaying the current settings
- Changing the current settings
- Displaying informations about time servers that are included in the data
  basis of the program
- Testing a time server (for example tcp or udp)
- Changing the data base

The program 'timesynchro' creates an executable file which will carry out the
time request and then set the times of the system and of the BIOS. Here its is
required that the BIOS time is set to GMT.

Additional functions:
- Setting a periodical coordination
- Creating the entry in /etc/crontab

The additional function is only useful when there is either a permanent or a
dial-on-demand connection to the time server.
Alternatively the executable file can be either entered into ip-up or manually
called.

Note:
Both setting the time and editing /etc/crontab require the special rights of
the root. That's why for the installation, the configuration and calling the
generated script you must be the root.

Installation:
-------------

- Download the archiv timeserver.tar.gz
- Enter tar -zxf timeserver.tar.gz in order to extract the archiv
- The directory timeserver is created
- Move into this directory and enter ./install
- Already existing programs that are required are detected automatically
- Query of the pathes and file names you wish (standard answers are given)
- Files are copied

The following files are copied:
- data base for time server
- data base for receiving information about the country/organisation from the
  top level domain
- configuration script

Note:
After the installation the extracted files can be deleted because they are not
neccessary any more.

Test:
The program was tested with SuSE 7.0, but it should also run on other systems.
Important requirements are the support of netdate and of dialog.

Operation:
----------

Call up 'timesynchro' as shown in the end of the installation.
A dialogue will help you to use the functions quickly and easily.
An executable script is created and the setting in /etc/crontab is done by
clicking the button 'change'.

Enlargement:
------------
There is also a sub directory 'timeserver_web' in the extracted directory.
During the installation the cgi scripts in this sub directory are adapted to
the entered pathes.
Copy these scripts into your cgi directory.
If neccessary adapt the httpd.conf.
For some actions here the rights of the root are required. That's why 'sudo'
must have been installed and some settings must be made in /etc/sudoers:

---------------------------------schnipp---------------------------------------
# Host alias specification
Host_Alias LOCAL=localhost,your-host-name

# Cmnd alias specification
Cmnd_Alias TIMEWEBEDIT=/your-cgi-path/timeserveredit.cgi
Cmnd_Alias TIMEDATAWEBEDIT=/your-cgi-path/timeserver_adddel.cgi
Cmnd_Alias NETDATE=/your-netdate-path
Cmnd_Alias CLOCK=/your-clock-path

# User privilege specification
root	ALL=(ALL) ALL
wwwrun	LOCAL=NOPASSWD:TIMEWEBEDIT,NOPASSWD:TIMEDATAWEBEDIT,NOPASSWD:NETDATE,NOPASSWD:CLOCK
---------------------------------schnapp---------------------------------------

The program 'visudo' should be used for editing the file /etc/sudoers.

Now you can use all functions of the program in the browser. The program is
guided by dialogues.

For the call-up in the browser enter:
http://your-computer-name/your-cgi-path/timeserver.cgi

These pages and scripts are included in the Internet in-a-box and in the
Internet-Manager by Nutzwerk.

All programs can be found in the GPL and may be used or changed in other
programs according to the GPL.
The author reserves the right not to be responsible for the function of the
programs. Liability claims regarding damage caused by the use of the program,
including following damages, will therefore be rejected. 
For more information on GPL see 'COPYING'.

Your comments and error reports are welcome to us.

Steffen Tittmann
Nutzwerk GmbH

s.tittmann@nutzwerk.de
www.nutzwerk.de
