*BSD News Article 10004


Return to BSD News archive

Received: by minnie.vk1xwt.ampr.org with NNTP
	id AA6959 ; Fri, 15 Jan 93 10:40:29 EST
Path: sserve!manuel.anu.edu.au!munnari.oz.au!uunet!paladin.american.edu!gatech!swrinde!emory!ogicse!psgrain!hippo!ccml
From: ccml@hippo.ru.ac.za (Mike Lawrie)
Newsgroups: comp.unix.bsd
Subject: Re: TRYING TO GET UUCP TO WORK. PLEASE HELP
Message-ID: <1993Jan17.141852.18410@hippo.ru.ac.za>
Date: 17 Jan 93 14:18:52 GMT
Article-I.D.: hippo.1993Jan17.141852.18410
References: <jerrys00101930011175123@holly.wimsey.bc.ca> <C0quGt.M3r@unx.sas.com> <chk.727114039@mcshh.hanse.de>
Distribution: world
Organization: Rhodes University, Grahamstown, South Africa
Lines: 279

In <chk.727114039@mcshh.hanse.de> chk@mcshh.Hanse.DE (Christian Kuhtz) writes:

>sastdr@torpid.unx.sas.com (Thomas David Rivers) writes:

>>In article <jerrys00101930011175123@holly.wimsey.bc.ca> jerrys@holly.wimsey.bc.ca (Jerry Sturge) writes:

....[cries for help].....

I'm no expert on this, but here is a guide that I prepared for some folk
who are isolated in Africa, and they are making pretty good progress so
far by following it. I cannot get the new com drivers configured, so
I've kludged things somewhat. Corrections/improvements to my document
would be much appreciated.

There is a file quagga.ru.ac.za:/pub/386bsd/unofficial/fromrhodes.tar.Z
which is supposed to have been used as the bible for the basic
installation of 386bsd in the ru.ac.za environment. I think that the
uucp guide is independent of this, but if you get stuck....

Read the " UUCP-How-to" text in the light of a machine called dzowo.uem.mz
needing to connect to kudu.ru.ac.za.

Mike


                  SOME HINTS ON SETTING UP UUCP ON 386BSD
                  ---------------------------------------

                       Version 1.02 -- 9 January 1993
                       ------------------------------

1. Some permissions need to be changed:-
   -----------------------------------

	chown -R uucp:daemon /var/spool/uucp
	chmod -R 775 /var/spool/uucp
	chown uucp:daemon /var/spool/lock
	chmod 1777 /var/spool/uucppublic


2. Configuring the /etc/uucp files
----------------------------------

A set of config files that should work in dialing to kudu (ie the uucp
gateway machine at Rhodes University) are given below. Extract them
and install them in /etc/uucp, and edit accordingly.


2.1 /etc/uucp/config
--------------------

Edit in the name of your system. This should normally be less than
7 characters, and excludes any domain information.

Example	Correct:	dzowo
	Incorrect:	dzowo.ciuem.mz


# rhino.ru.ac.za:/etc/uucp/config
# --------------------------------------------------------------
nodename YOUR_SYSTEM_NAME_HERE(Eg dzowo)
unknown commands
#files may be transferred to me in 
unknown pubdir /var/spool/uucppublic
#only send from pubdir (the default)
unknown remote-send ~ !~/rec
unknown remote-receive ~/rec
max-uuxqts 6
# Define each system in its own system file. Any number of 'sysfile'
# commands may be used. The immediate problem is to dial kudu, and
# to allow kudu to dial this computer.
sysfile /etc/uucp/kudu
portfile /etc/uucp/port
dialfile /etc/uucp/dial
logfile /var/spool/uucp/Log
statfile /var/spool/uucp/Stats
debugfile /var/spool/uucp/Debug
debug 2
# -----------------------------<ends>---------------------------



2.2 /etc/uucp/dial
------------------

This should work as is.

# rhino.ru.ac.za:/etc/uucp/dial
#-------------------------------------------------------------------
dialer hayes
chat "" ATZ\r\c OK \dATDT\D\r\c CONNECT
chat-fail BUSY
chat-fail ERROR
chat-fail NO\sCARRIER
complete \d\d+++\d\dATH\rATZ\r\c
abort \d\d+++\d\dATH\rATZ\r\c


2.3 /etc/uucp/kudu (New file)
------------------

Edit the line starting "phone" so that your system will dial to kudu
in South Africa (+27 461 311081). Spaces are unnecessary - if you modem
will accept them, then put them in for readability.

In the lines "call-login" and "call-password", you must insert the
name of your system and it's password as registered on kudu.


# rhino.ru.ac.za:/etc/uucp/kudu
# ------------------------------------------------------------------
# Each system may have a series of alternate choices to use when calling
# out or in. The first set of commands for a particular system, up to
# the first 'alternate' command, provide the first choice. Subsequently,
# each set of commands from 'alternate' to the next 'alternate' command
# describes an alternate choice for calling out or in.
# ------------------------------------------------------------------
system kudu
time Any
phone 311081
port port1
chat "" \r\c gin:-BREAK-gin:-BREAK-gin:-BREAK-gin: \d\d\L assword: \d\d\P
call-login rhino
call-password uninet
# -------------------<ends>-------------------------------------------



2.4 /etc/uucp/port
------------------

If you are using /dev/com2 instead of /dev/com1, then edit the line
that starts "device" accordingly. Note that you will have quite a few
other changes to make (eg at least 2 places in uucico.run), which are
probably going to be difficult to identify. So better to use /dev/com1.


# rhino.ru.ac.za:/etc/uucp/port
# --------------------------------------------------------------
port port1
type modem
device /dev/com1
speed 2400
dialer hayes
protocol-parameter g window 7
protocol-parameter g remote-window 7
# -------------------------<ends>-------------------------------



2.5 User-id for kudu
--------------------

In order for kudu to dial to you, you must provide a user-id and
password in /etc/passwd. Use "adduser" to create a basic entry and
password for a user called "kudu" in any convenient group, and then
use "vipw" to make changes as follows:-

2.5.1 user-index (ie third field)	66

2.5.2 group (fourth field)		1

2.5.3 home directory			/var/spool/uucppublic

2.5.4 login script			/usr/libexec/uucp/uucico

The adduser script (at Rhodes University, if nowhere else) creates
a home directory /usr/kudu. This directory can be removed.
(rm /usr/kudu)


3. Dial-in or Dial-out
----------------------

Currently we have not cracked how to do the setup so that the modem
can be used for both dial in and dial out. The kludge that we use 
(and this does not mean much, we don't dial regularly with 386bsd
yet) is based on the following:-

*	in /etc/ttys, there is a line starting "com1" (note, this
	is released as "com01", simply edit out the "0"). Towards
	the end of this line, there is the word "on" or "off".

*	If com1 is "on", then 386bsd can receive calls, but cannot
	make them, and vice versa.

*	To make a uucico call (ie the uucp workhorse program), you
	must turn com1 off, and type "kill -1 1" to make this change
	be effective

*	To receive any call (uucico or login or whatever), you must
	turn com1 on and type "kill -1 1".

*	Turning com1 on causes a prompt to be sent out that, on our
	modem anyway, sometimes causes the modem to lock-up. So it
	is necessary to reduce the prompt string by editing the file
	/etc/gettytab. You find the entry in /etc/gettytab that
	matches the baud rate setting of com1 in /etc/ttys, and make
	it look something like this:-

	From /etc/ttys

	com1	"/usr/libexec/getty std.2400"	unknown	on secure
	    	                        ^^^^

	From /etc/gettytab

	6|std.2400|2400-baud:\
		:sp#2400:im:
		         ^^^

*	This can all be done by using the (possibly dangerous) script
	file /etc/libexec/uucp/uucico.run to invoke the uucico
	program instead of /etc/libexec/uucp/uucico directly. It would
	be sensible to make a backup copy of /etc/ttys first.

	Backup copy of /etc/ttys (NB DON'T USE /etc/ttys.bak):-

		cp /etc/ttys /etc/ttys-

	Install uucico.run:-

		cp /fromrhodes/uucico.run /usr/libexec/uucp/uucico.run

	Edit any files that invoke uucico to now invoke uucico.run.


Alternatives are to leave your system as a dial-in-only or as a
dial-out-only system, or to manually edit the /etc/ttys file each
time you want to change dial-in/out status.


Here is /usr/libexec/uucp/uucico.run, which should be chmod 750:-


#!/bin/sh
# -------
# rhino.ru.ac.za:/usr/libexec/uucp/uucico.run
# -------------------------------------------
#
#                       P R O V I S I O N A L
#
# Front-ender for uucico, to set the dial-out mode for /dev/com1 and
# then to run uucico. At the end, reset /dev/com1 to dial-in. Well, that
# is the theory, but something seems to be upsetting either the First
# modem that was used to test, or else 386bsd has some problem.
#
# Mike Lawrie <ccml@hippo.ru.ac.za>
# -----------------------------------------------------------

cp /etc/ttys /etc/ttys.bak
awk '{if($1=="com1")printf("%s\t%s %s\t%s off %s\n",$1,$2,$3,$4,$6);else print;endif}' /etc/ttys.bak >/etc/ttys
sleep 2
kill -1 1
sleep 2
chown uucp /dev/com1
/usr/libexec/uucp/uucico $*
sleep 6
cp /etc/ttys /etc/ttys.bak
awk '{if($1=="com1")printf("%s\t%s %s\t%s on %s\n",$1,$2,$3,$4,$6);else print;endif}' /etc/ttys.bak >/etc/ttys
sleep 2
kill -1 1
sleep 2
# --------------------------------<ends>-------------------------



---------------------------------------------------------------------------
In the interests of building up a document that will be of values to
others, please send any comments, corrections, suggestion, errors to:

Mike Lawrie, Rhodes Unversity, Drostdy Road, Grahamstown 6140, South Africa
<ccml@hippo.ru.ac.za>
---------------------------------------------------------------------------
-- 
Mike Lawrie                                    <ccml@hippo.ru.ac.za>
Director, Computing Services                   ph +27 461 22023 x 279
Rhodes University, Drostdy Rd                  fx +27 461 25049
Grahamstown 6140, South Africa