From: heath@grok39.ColumbiaSC.NCR.COM (Robert.Heath)
Subject: How to Set Up UUCP over WIN-TCP on Sys3k (long but informative)
Organization: NCR Corp., Columbia SC
Date: Mon, 14 Dec 92 22:07:47 GMT


			INSTALLING UUCP ON A WIN-TCP NETWORK

Here's how to set up UUCP over WIN-TCP between two NCR System 3000's.

To install UUCP on a WIN-TCP network, you must perform these general steps:

* Configure your system's listener process to accept calls from remote systems

* Modify your system's UUCP administrative files to call remote systems

* Configure the remote system's listener process to accept calls from 
  your system

* Modify the remote system's UUCP administrative files to call your system

If you require login/password security under UUCP, you must also perform 
these general steps:

* Add a login name on your system into which each remote system's 
  UUCP can log in.

* Add a login name on each remote system into which your system's  UUCP
  can log in.

For best performance, you must set up both your system and each remote system
in complementary fashion.  Configure your system configured to call each remote
system; set up each remote system to call your system.


Before setting up UUCP, you must:

* Know your system's node name.  (Hint: type "uname -n".)

* Know the node name of each remote system you wish to contact.
  (Type "uname -n" on each remote system.)

* Be sure that WIN-TCP communication with the remote system exists,
  for example,  rlogin or telnet connects to the remote system.

* Decide if you want UUCP to use login/password protection.
  Before creating a UUCP network with login/password protection, 
  decide which login and password you will assign to each remote system's
  UUCP.   Likewise, ask the administrator of each 
  remote system to assign your system's UUCP a login and password.

* Login to your system with super-user privileges

You are then ready to start setting up UUCP over WIN-TCP.

SET UP YOUR SYSTEM'S LISTENER PROCESS
Set up  your local listener process using steps 1 through 8.
The procedure takes into account the possibility that your listener has
already been configured.

1) Create and initialize the files needed by the network listener by typing:

	nlsadmin -i tcp

If your listener has not already been initialized, the command displays 
no message.  Otherwise, the command displays the message:

	nlsadmin: error: Listener already initialized

Disregard the message if it appears.

2) Determine your system's Internet Protocol address and port number 
by typing:

	IPADDRESS=`/usr/etc/rfsaddr -h\`uname -n\``

If an error message appears, it implies a problem in the WIN-TCP 
configuration itself.
You won't be able to continue setting up UUCP until WIN-TCP is corrected.

Display your system's Internet and port address by typing:

	echo $IPADDRESS

The result will be a hexadecimal string similar to:

	\x00020ace874f6ca6

Save this string since you will need it when setting up  remote systems 
to call your system.
 
3)  Assign the address and port to your listener by typing:

	nlsadmin -l $IPADDRESS tcp

The command displays no message on successful completion.


If you want to install your UUCP listener with login/password protection, 
go to step 5, otherwise continue with step 4.

4) Add an unsecure listener service by typing:

	nlsadmin -a 101 -c "/usr/lib/uucp/uucico -r0 -iTLI -unuucp" \
		-y "uucp listener" tcp 


If the service already exists, you will see the message:

	nlsadmin: error: Service code already exists

If the message appears, ignore it.

Skip to step 9.

5) Add a secure listener service by typing 

	pmadm -a -fu -ptcp -s101 -iroot -v`nlsadmin -V` \
		-m`nlsadmin -c/bin/login -ptirdwr` -y "uucp network login"

If you have already set up the service, you may see the message:

	Invalid request, 101 already exists under tcp

6) Add a network login for each remote system that will call into your 
system, by typing:

	passmgmt -a -h /var/spool/uucppublic -s /usr/lib/uucp/uucico \
			-c "UUCP network login" <UUCP login>

where <UUCP login> is the login name you chose for the remote system.
Some administrators assign names like "xuucp" where `x' is the first
letter of the remote system name.

Note: The standard UUCP network login "nuucp" comes installed on your system.
Although you may let more than one system use the same UUCP network login
(e.g. nuucp), you may prefer to give each remote system its own login 
for greater security.

7) Add a password for each network login by typing:

	passwd <UUCP login>

The passwd command will prompt you to type and re-type the password which 
you wish to assign to <UUCP login>.

8) Using your favorite editor, at the top of your system's 
/etc/uucp/Permissions file, add a line similar to:

	LOGNAME=<UUCP login> MACHINE=<sysname> VALIDATE=<sysname>

where,
	<UUCP login> is the login name you chose for the remote system, and
	<sysname> is the name of the remote system

For each remote system which must login to your system, 
repeat steps 6 through 8.


9 ) Make sure your system's listener process has started by typing:

	nlsadmin -s tcp

You may see the message:

	nlsadmin: error: Listener already running


MODIFY YOUR SYSTEM'S UUCP ADMINISTRATIVE FILES FOR CALLS OVER WIN-TCP

10) Using your favorite editor, verify that the file /etc/uucp/Dialers contains
the line:

	tcp "" "" NLPS:000:001:101\N\c

anywhere in the file. If the line does not exist, or has been commented out by 
a `#' character,  add the line exactly as shown.

11) Using your favorite editor, verify that the file /etc/uucp/Devices contains
the lines:

	TCP,eg tcp - - TLI \D tcp
	TCPS,eg tcp - Any TLIS \D tcp

anywhere in the file.  If the lines do not exist, or have been commented out by
a `#' character, add the lines exactly as shown.  

12) Using your favorite editor, verify that the file /etc/uucp/Devconfig 
contains a line 

	service=uucico device=TCPS push=tirdwr

anywhere in the file.  If the line does not exist, or has been 
commented out by a `#' character, add the line exactly as shown.  


MODIFY YOUR UUCP SYSTEMS FILE FOR EACH SYSTEM YOU WISH TO CALL

13) Determine the remote system's listener's Internet address and port string.

If the remote system's listener has not been set up, set it up now by 
performing steps 1 through 9 on the remote machine as appropriate.
The goal is to configure the remote system's listener's address from step 2,
when performed on the remote system, into your system.

If the remote system's listener has been set up, determine its
Internet address by typing the following command ON THE REMOTE SYSTEM:

	nlsadmin -l - tcp

This value you obtain is called <IP address> in the following step.

14) Add an entry for the remote system into your system's /etc/uucp/Systems 
file using your favorite editor.  

If the remote system has login/password security, add a line like

<sysname> Any TCPS - <IP address> ogin: <UUCP login>\n\c ssword: <password>\n\c

Note the \n\c sequence following the <UUCP login> and <password>.

where,
	<sysname> is the remote system's name
	<IP address> is the Internet address and default port string 
	<UUCP login> is the name under which your system's UUCP logs 
                     into the remote system
	<password> is your system's UUCP login password on the remote

If the remote system does not nave login/password security, add a line like

	<sysname> Any TCP - <IP address> 

where,
	<sysname> is the remote system's name
	<IP address> is the Internet address and port


Repeat steps 13 and 14 for each remote system which your system calls.


SET UP EACH REMOTE SYSTEM TO RECOGNIZE YOUR SYSTEM
Setting up  systems for UUCP is complementary. 
You must set up each remote system to which your 
system connects to recognize your system.  Do this by  repeating 
the steps 1 through 14, as appropriate, on each remote system.

TESTING THE UUCP CONNECTION OVER WIN-TCP
After setting up the machines in your network, test out 
your UUCP connection to another system with a debugging trace.  
Type in:

	/usr/lib/uucp/Uutry -r <sysname>

where <sysname> is the name of a remote system.

A successful trace using login/password protection looks  like this:

  /usr/lib/uucp/uucico -r1 -s<sysname>  -f -x5 >/tmp/<sysname> 2>&1&
  tmp=/tmp/<sysname>
  force flag set (ignoring uucico limit)
  mchFind called (<sysname>)
  attempting to open /var/uucp/.Admin/account
  mkdir - /var/spool/uucp/<sysname>
  Job grade to process - 
  conn(<sysname>)
  Trying entry from '/etc/uucp/Systems' - device type TCPS.
  Device Type TCPS wanted
  Trying device entry 'tcp' from '/etc/uucp/Devices'.
  processdev: calling setdevcfg(uucico, TCPS)
  Internal caller type TLIS
  tlicall: bound to 
  t_connect to addr "\x00020ace884e7d8c"
  set interface TLIS
  tssetup: MASTER mode: leaving ok
  pop_push: PUSHing tirdwr
  gdial(tcp) called
  Trying caller script 'tcp' from '/etc/uucp/Dialers'.
  expect: ("")
  got it
  sendthem (NLPS:000:001:101^@<NO CR>)
  getto ret 8
  expect: (ogin:)
  login:got it
  sendthem (nuucp^J<NO CR>)
  expect: (word:)
   Password:got it
  sendthem (hot*dog^J<NO CR>)
  Login Successful: System=<sysname>
  msg-ROK -R -U0x3fffff -x5
   Rmtname <sysname>,  Restart YES, Role MASTER,  Ifn - 8, Loginuser - root
  rmesg - 'P' got PgGedxf
  wmesg 'U'e
  Proto started e
  *** TOP ***  -  Role=1, setline - X
  wmesg 'H'
  rmesg - 'H' got HY
   PROCESS: msg - HY
  HUP:
  wmesg 'H'Y
  cntrl - 0
  send OO 0,exit code 0
  Conversation Complete: Status SUCCEEDED
  

Be sure to initiate the connection between other machines and your own system.
Key in the same command on a remote system specifying your system's name
as <sysname>.

If both traces succeed, you have basic assurance that you will be
able to transfer files and even e-mail.


FOR FURTHER INFORMATION ON UUCP
See the section "Basic Networking Utilities" in the
NCR UNIX SVR4 Administrator Guide: Advanced Tasks.
Newsgroups: comp.sys.ncr