Subject : UUCP setup for Solaris 2.5 (Direct by null modem cable)

Description :

CONTENTS OF THIS MEMO : SUN CS Tech Hour 준비.

0. Introduction
1. Test Environment
2. UUCP files
3. Server System
4. Client System
5. uucp test 
6. Trouble shooting.(tip, STATUS, HANDSHAKE )
7. Appendix
   A:uucp setup for Solarix 2.X  Via Modems 

0. Introduction 

   UUCP 는 UNIX OS 를 이용하여 computer 들이 서로 remote terminal 를
   이용하여 통신하는것으로 관련된 utility 는 computer 간의 copy 를
   하기위한 uucp , uuto 와 remote login 의 cu 와 command 실행을 위한
   uux 가 있다. 사용형태는 direct link, telephone line, network 가 있다.  


1. Test Environment:

   0) Configuration                      192.9.10.X
                       |_________________________________________________|
                       |     |                                           |
                             |
    -----------         ------------
    |   WWW   |         | hyundai2 |
    |  Server |         | (Gateway)|
    -----------         ------------
        |                    |           203.240.159.X
|_______|____________________|___________________________________________|
|             |                              |                           |
              |                        ------------
         |---------|                   | hyundai3 | 203.240.159.35
         |  Router |                   ------------   
         -----------                         |
              |                              |
              .                              | ttya serial line
              .                              |  (9600 baud)
              |                              |
         -----------                         |
         |  이 천  |                   ------------  
         |   HEI   |                   |   wybee   | 203.240.158.81
         | Ami-Net |                   -------------
         -----------                         |       203.240.158.X
                           |_________________|___________________________|
                           |                                             |

   1) Axil311   
                 OS     : Solaris 2.5 (KLE)
                 Name   : hyundai3
                 Type   : server
                 Port   : ttya ( default value or dial in )
                 baud   : 9600

   2) Axil320    
                 OS     : Solaris 2.5 (KLE)
                 Name   : wybee
                 Type   : client
                 Port   : ttya ( service disable : ux )
                 baud   : 9600

   3) Pin assign : null modem cable
      ( 1:gnd 2:tx 3:rx 4:rts 5:cts 6:dsr 7:gnd 8:dcd 20:dtr)

		1 ------------------- 1
                2 ------------------- 3
                3 ------------------- 2
                4 ------------------- 5
                5 ------------------- 4
           ---- 6                     6 ----
           |    7 ------------------- 7    |
           ---- 8 ------------------- 20   |
               20 ------------------- 8



2. UUCP files
   0) #vi /etc/init.dconf
    uucp      stream tcp nowait root /usr/sbin/in.uucpd in.uucpd 

      #vi /etc/services
   uucp-path       117/tcp
   uucp            540/tcp         uucpd           # uucp daemon

   1) Devices File ( /etc/uucp/devices)

    * 이 화일은 remote computer 와 의 연결을 위해 사용될 모든 devices 에 
    대한 information 을 가진다
    (automatic call, direct links, network connection)
    이 화일은  Dialers, Systems, 같은 화일과 의 연관관계가 있으므로 혹시
    화일수정시에는 관련화일도 check 요망됨.

        

    ex) ACU cua/b - Any Hayes
        Direct term/a - 9600 direct
   
    * Type filed : 이 field 는 Direct 또는 ACU 를 가진다.
    * Line filed : 이것은 사용되는 port  이름을 나타냄.
    * Line2 field : 항상 - (hyper) 를 사용한다.
    * Class field : ACU or Direct 일경우는 speed  를 나타냄.
                    Systems 의 4번째 필드와 일치함.
    * Dialer-Token-Pairs field : dialers 와 token 으로 구성되며
                   Direct link device 일때는 direct 가 사용됨.
                   Dialers 의 첫번째 필드와 일치됨.

   2) Dialers File ( /etc/uucp/Dialers)

    * 이 화일은 data 전송이 가능하기전의 line 상에서 일어나는 초기 conver-
      sation 을 나타내며 보통 전송되고 기대되는 ASCII strings 의  
      sequence 이다. ASCII dialer 를 사용한 phone number 을 dialing 할
      경우에 주로 사용되며 chat script 라고도 알려져 있다. 

   3) Systems File ( /etc/uucp/Systems)
    
    * 이 화일은 remote computer 와의 연결을 위해 uucico daemon 이 필요한
      정보를 가지며 각 요소는 당신의 시스템에서 call 되어질 computer 에
      대한것을 나타낸다.

    form: Machine-Name Time Type Class Phone Login
    ex) cuuxb Any ACU 1200 chicago8101242 in:--in: nuucp word: panzer
    hyundai3 Any Direct 9600 direct "" P_ZERO in: wybee word: wybee123

    * Setting Parity : 몇몇경우에 있어 당신은 당신이 call 하고있는 시스템
     이 port parity 를 check 하고 만약 맞지않으면 line 을 drop 시키키
     때문에 parity 를 reset 해야할경우도 있다.
     expect-send 의 P_ZERO 는 chat script 의 시작부분에 insert 되면
     parity 를 0 으로 set 하게된다. 예를 들면 위의경우이다.
     동일한 방법으로 P_EVEN 은 default 로 even  이고, P_ODD 는 odd,
     P_ONE 는 0 오 set 된다. 이것은 Dialers file 에도 사용가능하다.


3. Server Configuration

   1) user 등록.
   hyundai3# vi /etc/passwd
   ...............
   wybee:x:9:9:uucp Admin:/var/spool/uucppublic:/usr/lib/uucp/uucico
   ...............

   hyundai3# pwconv
   hyundai3# more /etc/shadow
   ...............
   wybee:5DOVBY.QhMjq.:9264::::::
   ...............

   3) UUCP database 등록.

   hyundai3# more Systems
   ############################
   wybee Never
   ############################

   hyundai3# more Devices
   ############################
   Direct term/a - 9600 direct
   ############################

   hyundai3# more Dialers
   ############################
   direct "" "" P_ZERO ""
   ############################

   hyundai3# more Permissions
   ############################
   LOGNAME=wybee MACHINE=hyundai3 VALIDATE=hyundai3 COMMANDS=rmail 
   REQUEST=yes SENDFILES=yes
   ############################


4. Client Configuration


   1) wybee# more Systems

   ############################
   hyundai3 Any Direct 9600 direct "" P_ZERO in: wybee word: wybee123
   ############################

   2) wybee# more Devices

   ############################
   Direct cua/a - Any direct
   ############################

   3) wybee# more Dialers

   ################################
   direct ""       "" \r\d in:--in:
   ################################


5. uucp test 

    1) port test

    wybee# more /etc/remote
    ...
    ha:\
            :dv=/dev/cua/a:br#9600:el=^C^S^Q^U^D:ie=%$:oe=^D:
 
    wybee# tip ha
    connected
 
    login: root
    Password:
    Last login: Sat May 13 10:44:04 on console
    Sun Microsystems Inc.   SunOS 5.5       Generic November 1995
    You have mail.
    hyundai3# ~
    [EOT]

     2) cu test

    NAME
         cu - call another UNIX system
 
    SYNOPSIS
     cu [ -c device | -l line ] [ -s speed ] [ -b bits ] [ -h ]
          [ -n ] [ -t ] [ -d ] [ -o | -e ] [ -L ]
          [ -C ] [ -H ] telno|systemname [ local-cmd ]
 
 
    ....
    ~.                  Terminate the conversation.
    ~!                  Escape to an interactive  shell  on  the
                        local system.

    ~!cmd...            Run cmd on the local system (via sh -c).

    ~$cmd...            Run cmd locally and send its  output  to
                         the remote system.
    ...
    ~t                  Prints the values of the  termio  struc-
                         ture  variables  for the user's terminal
                         (useful for debugging).

     ~l                  Prints the values of the  termio  struc-
                         ture variables for the remote communica-
                         tion line (useful for debugging).



    wybee# !!
    cu hyundai3
    Connected

    ~[wybee]tot
    device status for fd=0
    F_GETFL=2,iflag=`32046',oflag=`1',cflag=`2275',lflag=`105060',line=`0'
    cc[0]=`3',[1]=`34',[2]=`177',[3]=`25',[4]=`1',[5]=`0',[6]=`0',[7]=`0',
    ~[wybee]l)
    device status for fd=6
    F_GETFL=2,iflag=`12045',oflag=`0',cflag=`2655',lflag=`0',line=`0'
    cc[0]=`3',[1]=`34',[2]=`177',[3]=`25',[4]=`1',[5]=`0',[6]=`0',[7]=`0',
    (continue)~[wybee]t
    device status for fd=0
    F_GETFL=2,iflag=`32046',oflag=`1',cflag=`2275',lflag=`105060',line=`0'
    cc[0]=`3',[1]=`34',[2]=`177',[3]=`25',[4]=`1',[5]=`0',[6]=`0',[7]=`0',
    (continue)

    (continue)~[wybee].

    Disconnected
    wybee#


    wybee# cu -d hyundai3
    conn(hyundai3)
    Trying entry from '/etc/uucp/Systems' - device type Direct.
    Device Type Direct wanted
    Trying device entry 'term/a' from '/etc/uucp/Devices'.
    processdev: calling setdevcfg(cu, Direct)
    fd_mklock: ok
    fixline(6, 9600)
    gdial(direct) called
    Trying caller script 'direct' from '/etc/uucp/Dialers'.
    getto ret 6
    device status for fd=6
    F_GETFL=2,iflag=`12045',oflag=`0',cflag=`2655',lflag=`0',line=`0'
    cc[0]=`3',[1]=`34',[2]=`177',[3]=`25',[4]=`1',[5]=`0',[6]=`0',[7]=`0',
    call _mode(1)
    Connected
    transmit started
    _receive started

    login:

    login:root   <---- hangup


    sol) 8bit setting 이 안됨.

    wybee# cu -b 8 hyundai3 ls
    Connected

    login: root
    Password:
    Last login: Sat May 13 13:40:06 from candy
    Sun Microsystems Inc.   SunOS 5.5       Generic November 1995
    You have mail.
    hyundai3#



    wybee# cu hyundai3
    Connected

    login:


     3) uucp test ( /var/spool/uucppublic )

   wybee# uucp file Answer!/var/spool/uucppublic/file
   wybee# uucp hyundai3\!/.cshrc /tmp/.
   wybee# uustat
   hyundaiZ1827 05/15-09:00 R  hyundai3  root  /.cshrc
   wybee# uustat
   wybee# uulog
   ....
   root hyundai3 hyundaiZ1827 (5/15-9:00:59,912,0) REQUEST 
   (hyundai3!/.cshrc --> wybee!/tmp/ (root))
   root hyundai3 hyundaiZ1827 (5/15-9:00:59,912,1) REQUEST 
   (remote access to path/file denied)
   uucp hyundai3  (5/15-9:01:00,912,1) OK (conversation complete term/a 8)


   hyundai3# vi /etc/uucp/Permissions
   hyundai3# cd /var/spool/uucppublic
   hyundai3# ls
   hyundai3# ls -al
   총 6
   drwxrwxrwt   2 uucp     uucp         512  5월 15일  08:54 .
   drwxrwxr-x   9 root     bin          512 1996년  5월  8일 ..
   -rw-rw-rw-   1 uucp     9            134  5월 15일  08:54 .cshrc
   hyundai3# pwd
   /var/spool/uucppublic
   hyundai3#
 
   wybee# cd /tmp
   wybee# uustat
   hyundaiZ182a 05/15-09:10 R  hyundai3  root  /var/spool/uucppublic/.cshrc
   wybee# uustat
   hyundaiZ182a 05/15-09:10 R  hyundai3  root  /var/spool/uucppublic/.cshrc
   wybee# uustat
   wybee#

   wybee#uulog
   ..
   uucp hyundai3  (5/15-9:10:15,989,0) OK (startup)
   root hyundai3 hyundaiZ182a (5/15-9:10:15,989,0) REQUEST 
   (hyundai3!/var/spool/uucppublic/.cshrc --> wybee!/tmp/ (root))
   uucp hyundai3  (5/15-9:10:16,989,1) OK (conversation complete term/a 8)
   wybee#
   wybee# pwd
   /tmp
   wybee# ls -al .cshrc
   -rw-rw-rw-   1 uucp     other        134  5월 15일  09:10 .cshrc
   wybee#

6. Trouble shooting.

   0) tip test failed ( /dev/term/a: Permission denied, all ports busy)

   wybee# tip ha
   tip: /dev/term/a: Permission denied
   all ports busy

   wybee# ls -al /dev/term/a
   lrwxrwxrwx   1 root     root          32  5월 13일  18:45 /dev/term/a -> 
                                          ../../devices/obio/zs@0,100000:a
   wybee# ls -al /devices/obio/zs*a*
   crw--w----   1 root     tty       29,  0  5월 23일  08:39 
                                          /devices/obio/zs@0,100000:a
   crw-rw-rw-   1 uucp     uucp      29,131072  5월 22일  15:28 
                                          /devices/obio/zs@0,100000:a,cu
   sol) wybee# chmod 666 !$
   chmod 666 /devices/obio/zs*a*
   wybee# 
   wybee# tip ha
   connected

   login: 

   1)Uutry test (Status failed)

   wybee# !U
   Uutry -r hyundai3
   /usr/lib/uucp/uucico -r1 -shyundai3  -f -x5 >/tmp/hyundai3 2>&1&
   tmp=/tmp/hyundai3
   mchFind called (hyundai3)
   name (DEFAULT) not found; return FAIL
   name (hyundai3) not found; return FAIL
   name (DEFAULT) not found; return FAIL
   name (OTHER) not found; return FAIL
   attempting to open /var/uucp/.Admin/account
   Job grade to process - 
   conn(hyundai3)
   Trying entry from '/etc/uucp/Systems' - device type Direct.
   Device Type Direct wanted
   Trying device entry 'term/a' from '/etc/uucp/Devices'.
   processdev: calling setdevcfg(uucico, Direct)
   gdial(direct) called
   Trying caller script 'direct' from '/etc/uucp/Dialers'.
   expect: ("")
   got it
   expect: ("")
   got it
   getto ret 8
   expect: (in:)
   ^M^M^Jlogin:got it
   sendthem (wybee^M)
   expect: (word:)
   wybee^M^JPassword:got it
   sendthem (wybee123^M)
   Login Successful: System=hyundai3
   msg-RYou are unknown t
   exit code 101
   Conversation Complete: Status FAILED

sol) Server  쪽의 /etc/uucp/Systems, /etc/uucp/Devices, 
     /etc/uucp/Dialers, /etc/uucp/Permissions 확인
     즉, PPP 인 경우는 UUCP database 를 사용하지만 위의 log 
     처럼 Login Successful 이면 그 이후는 link manager 가
     다음역할을 수행하여  aspppd, aspppls 와 연계시키나
     UUCP  는 server 쪽의 uucp db file 도 등록해야됨
     등록을 하지않을경우에는 다음과 같은 message  도 볼수가 있음.(uulog)
     Login Successful: System=hyundai3
     msg-RYou are unknown to me
     HANDSHAKE FAILED: REMOTE DOES NOT KNOW ME
     exit code 101
     Conversation Complete: Status FAILED

    각각 uucp file 를 테스트해본결과 실제 꼭있어야될 화일은
    server 쪽에서 Systems 어었고 Devices 나 Dialers 는 반드시 필요하지는
    않은것 같음.

   hyundai3# more Systems
 
   ############################
   wybee Never
   ############################
 
   hyundai3# more Devices
 
   ############################
   Direct term/a - 9600 direct
   ############################
 
   hyundai3# more Dialers
 
   ############################
   direct "" "" P_ZERO ""
   ############################

   (Uutry test success)

   ..................
   wybee^M^JPassword:got it
   sendthem (wybee123^M)
   Login Successful: System=hyundai3
   msg-ROK -R -U0x3fffff -x5
   Rmtname hyundai3,  Restart YES, Role MASTER,  Ifn - 8, Loginuser - root
   rmesg - 'P' got PgGetxf
   wmesg 'U'g
   Proto started g
   *** TOP ***  -  Role=1, setline - X
   Request: hyundai3!/var/spool/uucppublic/a --> wybee!/tmp/ (root)
   wrktype - R
   ..................
   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


   2)Uutry test (HAND SHAKE failed)

   wybee# cd /usr/lib/uucp
   wybee# Uutry -r hyundai3
   /usr/lib/uucp/uucico -r1 -shyundai3  -f -x5 >/tmp/hyundai3 2>&1&
   tmp=/tmp/hyundai3
   force flag set (ignoring uucico limit)
   mchFind called (hyundai3)
   name (DEFAULT) not found; return FAIL
   name (hyundai3) not found; return FAIL
   name (DEFAULT) not found; return FAIL
   name (OTHER) not found; return FAIL
   attempting to open /var/uucp/.Admin/account
   stat /var/spool/uucp/hyundai3/Z
   ulockf name /var/spool/locks/LCK..hyundai.Z
   Job grade to process - Z
   conn(hyundai3)
   Trying entry from '/etc/uucp/Systems' - device type Direct.
   Device Type Direct wanted
   Trying device entry 'term/a' from '/etc/uucp/Devices'.
   processdev: calling setdevcfg(uucico, Direct)
   gdial(direct) called
   Trying caller script 'direct' from '/etc/uucp/Dialers'.
   getto ret 8
   expect: ("")
   got it
   expect: (in:)
   ^M^M^Jlogin:got it
   sendthem (wybee^M)
   expect: (word:)
   wybee^M^JPassword:got it
   sendthem (wybee123^M)
   Login Successful: System=hyundai3
   msg-RLOGIN
   HANDSHAKE FAILED: REMOTE REJECT AFTER LOGIN
   exit code 101
   Conversation Complete: Status FAILED


   sol) SunSolve Document infodoc/11867

   SYNOPSIS:
    UUCP Hands
   DETAIL DESCRIPTION:

       Handshake Failed Remote Reject After login

1.)  Calling host /etc/uucp/Systems file chat script login info
     does not match the remote host LOGNAME option.

   ie. ogin: oscar  assword: turbo   (Local host)
 
   LOGNAME=benny   (Remote host /etc/uucp/Permissions file)
 
   it should be:
 
   ogin: benny   (Local host /etc/uucp/Systems file)
 
   PRODUCT AREA: Gen. Network
   PRODUCT: uucp
   SUNOS RELEASE: Solaris 2.x
   HARDWARE: any
 
 
   hyundai3# more /etc/uucp/Permissions
   LOGNAME=ppp MACHINE=hyundai3 VALIDATE=hyundai3 COMMANDS=rmail 
   REQUEST=yes SENDFILES=yes
 
   hyundai3# more /etc/uucp/Permissions
   LOGNAME=wybee MACHINE=hyundai3 VALIDATE=hyundai3 COMMANDS=rmail 
   REQUEST=yes SENDFILES=yes
   hyundai3#
 
 
   Cwybee# Uutry -r hyundai3
   /usr/lib/uucp/uucico -r1 -shyundai3  -f -x5 >/tmp/hyundai3 2>&1&
   tmp=/tmp/hyundai3
   force flag set (ignoring uucico limit)
   mchFind called (hyundai3)
   name (DEFAULT) not found; return FAIL
   name (hyundai3) not found; return FAIL
   name (DEFAULT) not found; return FAIL
   name (OTHER) not found; return FAIL
   attempting to open /var/uucp/.Admin/account
   stat /var/spool/uucp/hyundai3/Z
   ulockf name /var/spool/locks/LCK..hyundai.Z
   Job grade to process - Z
   conn(hyundai3)
   Trying entry from '/etc/uucp/Systems' - device type Direct.
   Device Type Direct wanted
   Trying device entry 'term/a' from '/etc/uucp/Devices'.
   processdev: calling setdevcfg(uucico, Direct)
   gdial(direct) called
   Trying caller script 'direct' from '/etc/uucp/Dialers'.
   getto ret 8
   expect: ("")
   got it
   expect: (in:)
   ^M^M^Jlogin:got it
   sendthem (wybee^M)
   expect: (word:)
   wybee^M^JPassword:got it
   sendthem (wybee123^M)
   Login Successful: System=hyundai3
   msg-ROK -R -U0x3fffff -x5
   Rmtname hyundai3,  Restart YES, Role MASTER,  Ifn - 8, Loginuser - root
   rmesg - 'P' got PgGetxf
   wmesg 'U'g
   Proto started g
   *** TOP ***  -  Role=1, setline - X
   Request: hyundai3!/.cshrc --> wybee!/tmp/ (root)
   wrktype - R
   wmesg 'R' /.cshrc /tmp/ root -dc dummy 777 root D.wybee18244e6
  rmesg - 'R' got RN2
  PROCESS: msg - RN2
  RCVFILE:
  mailopt 0, statfopt 0
  *** TOP ***  -  Role=1, setline - X
  Finished Processing file: /var/spool/uucp/hyundai3/Z/C.hyundaiZ1824
  Request: wybee!/.cshrc --> hyundai3!/var/spool/uucppublic/ (root)
  wrktype - S
  wmesg 'S' /.cshrc /var/spool/uucppublic/ root -dc D.hyund1825702 
  644 root dummyrmesg - 'S' got SY 0x0
  PROCESS: msg - SY 0x0
  SNDFILE:
  -> 134 / 0.001 secs, 134000 bytes/sec
  rmesg - 'C' got CY
  PROCESS: msg - CY
  RQSTCMPT:
  mailopt 0, statfopt 0
  *** TOP ***  -  Role=1, setline - X
  Finished Processing file: /var/spool/uucp/hyundai3/Z/C.hyundaiZ1825
  stat /var/spool/uucp/hyundai3/Z
  ulockf name /var/spool/locks/LCK..hyundai.Z
  Job grade to process -
  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



7. Appendix

A:uucp setup for Solarix 2.X  Via Modems 

SunSolve Document faqs/1022


[ Notify of changes | Mark infodoc for later retrieval ]

SYNOPSIS:
  How to setup UUCP in Solaris
DETAIL DESCRIPTION:

Setting Up UUCP: Solaris 2.x  Via Modems
----------------------------------------

On a local machine called "tempest" and setting up deta connect to a
remote machine called "waterloo".

(1)
Setting up EEPROM
-----------------

 #eeprom ttya-rts-dtr-off=false
 #eeprom ttya-ignore-cd=true
 #eeprom ttya-mode=9600,8,n,1,-
 #this one may vary depending on modem speed etc

or

 halt system and
 OK setenv ttya-rts-dtr-off=false
 OK setenv ttya-ignore-cd=true
 OK setenv ttya-mode=9600,8,n,1,-
 OK reset

port "A" is selcted .   (/dev/term/a on motherboard )

/dev/term/a for dial-ins.  /dev/cua/a for dialing out.

(2)
Set up SAF
----------

Create a port monitor of type "ttymon"

 #ttyadm -V
 1
 #sacadm -a  -p uucpmon  -t ttymon -c /usr/lib/saf/ttymon -v 1

Check the port monitor is okay

 #sacadm -l

 PMTAG          PMTYPE         FLGS RCNT STATUS     COMMAND
 uucpmon        ttymon         -    0    ENABLED
 /usr/lib/saf/ttymon #serial A

Add a bidirectional service to the port monitor, and name the service;
in the example the service tag is "ttya".

 #pmadm -a -p uucpmon -s ttya -i root -fu -v 1 -m "`ttyadm -b -d
 /dev/term/a -l "

Check the Service is okay

 #pmadm -l  -p uucpmon
 PMTAG          PMTYPE    SVCTAG   FLGS ID   
 uucpmon        ttymon    ttya     u    root  /dev/term/a b -
 /usr/bin/login - c

(3)
Set up UUCP files
-----------------

Add an entry in /etc/uucp/Systems to enable uucp to dial out.  I.e set
up the chit-chat script.  Tempest will dial into the machine called
"waterloo" as the user "tempest", and will supply the password "secret".

 #cd /etc/uucp
 #vi Systems
 waterloo Any ACU 9600 1234567  ogin:--ogin: tempest word: secret

#NOTE:  varying the chat script is sometimes necessary. i.e

waterloo Any ACU 9600 1234567 "" \r\r\d\d ogin:--ogin: tempest word:
secret

In this chat script the introduction of \r (returns) and \d (2 second
delays) mp synchronisation.  Try varying the script if problems occur.

Next, set up Modem Line details.
# vi Devices
ACU cua/a,M  - 9600 hayes

The example is using a Hayes compatible MultiTech modem at 9600.

(4)
Seting up a UUCP user.
---------------------

On the "remote" machine a user must be created for the local user to
login.  In this example on the remote machine (called waterloo) the user
called "tempest" is created (i.e., reflecting the machine the user will
log in from.

#vi /etc/passwd
root:x:0:1:0000-Admin(0000):/:/sbin/sh
rootk:x:0:1:0000-Admin(0000):/:/usr/bin/ksh
daemon:x:1:1:0000-Admin(0000):/:
bin:x:2:2:0000-Admin(0000):/usr/bin:
sys:x:3:3:0000-Admin(0000):/:
adm:x:4:4:0000-Admin(0000):/var/adm:
lp:x:71:8:0000-lp(0000):/usr/spool/lp:
smtp:x:0:0:mail daemon user:/:
uucp:x:5:5:0000-uucp(0000):/usr/lib/uucp:
nuucp:x:9:9:0000-
uucp(0000):/var/spool/uucppublic:/usr/lib/uucp/uucico
listen:x:37:4:Network Admin:/usr/net/nls:
nobody:x:60001:60001:uid no body:/:
noaccess:x:60002:60002:uid no access:/:
nuucp:x:9:9:0000-
uucp(0000):/var/spool/uucppublic:/usr/lib/uucp/uucico
tempest:x:9:9:0000-
uucp(0000):/var/spool/uucppublic:/usr/lib/uucp/uucico

This says, when a user called "tempest" dials IN, give the user a uucico
shell.  The user called tempest will dial in from a machine called
tempest as a uucp trn takes place.  i.e typically when uudemon.hour is
run by cron.

On Solaris 2, having added the user.

 #pwconv
 To update the /etc/shadow file

 #passwd tempest

Set the password to whatever the /etc/uucp/Systems file says the users
password i.e secret in my example Systems file shown above.

Although you do not need to add patches, you do have to edit
/etc/minor_perm and the zs line as follows: See bug: 1100726

 zs:* 0666 uucp uucp

Reboot and rebuild /devices zs entries.

 #rm -r /devices/zs*
 #touch /reconfigure
 # init 6

or

 #rm -r /devices/zs*
 #init 0
 OK boot -r

(5)
Test uucp
---------

It's a good idea to create a small shell script to allow testing to
always remove .Status files which would otherwise cause "RETRY" problems.

 #!/bin/sh
 # this script is called uucp_test

 rm /var/spool/uucp/.Status/*
 /usr/lib/uucp/uucico -r1 -x9 -swaterloo

When run it should show something like:

Run as root.
#uucp_test
+ rm -f /var/uucp/.Status/waterloo
+ /usr/lib/uucp/Uutry -x9 waterloo
/var/spool/uucp/.Status/*: No such file or directory
/usr/lib/uucp/uucico -r1 -swaterloo   -x9 >/tmp/waterloo 2>&1&
tmp=/tmp/waterloo
Uucico limit 5 -- continuing
mchFind called (waterloo)
list (rmail) num = 1
name (DEFAULT) not found; return FAIL
list (rmail) num = 1
_Request (TRUE), _Switch (TRUE), _CallBack (FALSE), _MyName (),
_NoSpool (FALSEl
attempting to open /var/uucp/.Admin/account
failed to open /var/uucp/.Admin/account.  Errno=2
chdir(/var/spool/uucp/waterloo)
stat /var/spool/uucp/waterloo/Z
ulockf name /var/spool/locks/LCK..waterlo.Z
Job grade to process -
conn(waterloo)
Trying entry from '/etc/uucp/Systems' - device type ACU.
Device Type ACU wanted
Trying device entry 'cua/a' from '/etc/uucp/Devices'.
processdev: calling setdevcfg(uucico, ACU)
opening with O_NDELAY set
fd_mklock: ok
clear O_NDELAY
fixline(7, 9600)
gdial(hayes) called
Trying caller script 'hayes' from '/etc/uucp/Dialers'.
expect: ("")
got it

sendthem (DELAY APAUSE
TE1V1X1Q0S2=255S12=255^M)
expect: (OK^M)
ATE1V1X1Q0S2=255S12=255^M^M^JOK^Mgot it
sendthem (ECHO CHECK ON
A^JATTDDTT1166333355^M^M)
expect: (CONNECT)
^M^JCONNECTgot it
getto ret 7
expect: (ogin:)
 9600^M^J^M^M^Jlogin:got it
sendthem (tempest^M)
expect: (word:)
 tempest^M^JPassword:got it
sendthem (secret^M)
imsg >^M^JLast login: Mon Oct 11 17:54:56 on
term/a^M^J^PShere=waterloo^@Login o
omsg "Stempest -Q0 -R -U0x3fffff -x9"
imsg >^PROK -R -U0x3fffff -x9^@msg-ROK -R -U0x3fffff -x9
 Rmtname waterloo,  Restart YES, Role MASTER,  Ifn - 7, Loginuser
- root
rmesg - 'P' imsg >^PPgGetxf^@got PgGetxf
Slave protocol list(gGetxf)
Master protocol list(gGetxf)
wmesg 'U'g
omsg "Ug"
Setting up protocol parameters 'gGetxf'
send CNTL, INITA, val 7
recv CNTL, INITA, val 7
send CNTL, INITB, val 1
state - [INIT code a] (01)
recv CNTL, INITB, val 1
send CNTL, INITC, val 7
state - [INIT code a]&[INIT code b] (03)
recv CNTL, INITC, val 7
state - [O.K.] (010)
Proto started g
*** TOP ***  -  Role=1, setline - X
gtwvec: dir /var/spool/uucp/waterloo
wmesg 'H'
send DATA, loc 1, rem 0
rmesg - 'H' recv CNTL, RR, val 1
state - [O.K.] (010)
send CNTL, RR, val 1
got HY
 PROCESS: msg - HY
HUP:
wmesg 'H'Y
send DATA, loc 2, rem 1
send CNTL, CLOSE, val 0
send CNTL, CLOSE, val 0
cntrl - 0
omsg "OOOOOO"
send OO 0,omsg "OOOOOO"
imsg omsg "OOOOOO"
imsg
Conversation Complete: Status SUCCEEDED

TM_cnt: 0

------------------------------------------------------------------

CU will also test the line for you:

 #cu -lcua/a -s9600 -t -d 123456
 Should give you a login on remote machine.

Remember that the /etc/uucp/Permissions file on "remote" machine must
allow you to log in.  Here is a brief example of what the remote
machines (waterloo's) /etc/uucp/Permissions file might say for the
tempest machine (user) login:

#cat /etc/uucp/Permissions
#/etc/uucp/Permisssions on waterloo

#
# per-machine and per-login permissions, e.g.,
# LOGNAME=Usun MACHINE=sun VALIDATE=sun COMMANDS=rmail REQUEST=yes
# SENDFILES=yes
#
# See the System and Network Administration Manual for more
#  information.
#
MACHINE=tempest LOGNAME=tempest COMMANDS=rmail REQUEST=yes
SENDFILES=yes

DATE APPROVED: 11/20/95

KEYWORDS:      UUCP modem EEPROM SAF

OS RELEASE:    2.2, 2.3, 2.4


Revision History

작성일자 : 96.06.12
작성자 : 이승훈

수정일자 : 
수정자