
Program:	st (settime)	

Author:		Todd Lawence (T. Marauder) -  marauder@phantom.com

Version:	V1.01-00

Date:		October 3, 1994

Purpose:	Steal some systems time (especially those who update
                theirs via the atomic clocks), and via tcp update your own.

Description:	The shell-script "st" is intended to be called from
                the crontab on a weekly basis.

Copyright:	Copyright (c) - 1994 - LoD Communications

		Permission to copy, modify and distribute this software
		package is hereby given. Provided that this text and,
		reference to the original author is left intact in any
		copy, modification or distribution of this document
		and any part of the accompanying code.


Installation:	Read the included INSTALLATION to get st up an running
		as quickly as possible. Otherwise see Usage: below.
 

Usage:

After unpacking the archive you should have the files:


	Makefile	- Standard makefile
	README 		- this document
	INSTALLATION	- Quick installation instructions
	gettime.c       - Program to take a hosts time
	st		- shell script to update localhost time
	


Getting Started:

If everyting looks like it is in place, edit the Makefile to suit your
system, and type:

		make gettime

This should result in the creation of a "gettime" binary.
		
Select three hosts that you believe to keep the most accurate time, making
sure they fall within the proper time zone for your own systems time. Take a
look at the manpage for "date", and take a look at the "TIMEZONE" parameter
in the "st" shell script. Once you have selected the hostnames you can test
them by calling the gettime program directly:
	
		"gettime <hostname>"

If everything goes ok, execution of the above command should result in the
current date & time (current as believed by the "<hostname>"), being sent to
stdout. for example:

		
		bash$ gettime darkstar.com

		03 OCT 1994 23:43:32 EDT 


Repeat the above step for each of your three systems. Once you have selected
three reliable hosts, edit the script "st" and insert them into the shell
variables as shown in the examples. "st" simply allows you to select three
hostanmes for redundancy, if the first host succeeds, "st" will update your
system time, and e-mail the admin that the update was successful. If it
fails, st will default to the second, if the second fails, st will default
to the third. If the third host fails, st will then fail and mail the system
administrator that settime failed. At this time you can edit the other shell
variables to suit your own tastes. All variables used in "st" are self
explanatory. Once you have "st" configured as you like, type:

   make install.

This will move the two files: "st" and "gettime" (by default) to the
/usr/local/bin directory, and change their permissions to 700, group and
owner to root. You must be suid to root to install the package this way.


lastly make an entry in your crontab to run st once a week, or however often
you feel it is needed to keep your system in time with the rest of the
world. I update mine once a week. My crontab entry looks like:

   5 3 7,14,21,28  * * /usr/local/bin/st

The above crontab entry will update system time, once a week at 3:15AM.



Any Comments corrections or improvements can be mailed to me:

marauder@phantom.com


  





  
		 	
