*BSD News Article 72424


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.bhp.com.au!mel.dit.csiro.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!news.sdsmt.edu!news.mid.net!newsfeeder.gi.net!newsfeed.internetmci.com!swrinde!cs.utexas.edu!news.tamu.edu!newshost.comco.com!newsfeed.concentric.net!news-master!cnc099044.concentric.net!user
From: jyanek@concentric.net (Jay Yanek)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: User PPP works manually but not with script
Date: Sat, 29 Jun 1996 21:55:00 -0500
Organization: Concentric Internet Services
Lines: 90
Message-ID: <jyanek-2906962155000001@cnc099044.concentric.net>
NNTP-Posting-Host: cnc099031.concentric.net
X-Newsreader: Value-Added NewsWatcher 2.0b27.1+

I've been successful at getting user PPP working manually.  By manually I
mean by typing TERM at the ppp prompt.  Unfortunately, when I try to run
it as a script, it kicks into the shell.  Example:

   % ppp provider
   ppp ON myhost> dial
   login OK!
   %

As you can see, ppp quit on me!  Ok, so I try to do it again, this time
manually:

   % ppp provider
   ppp ON myhost> term
   
   [here I go through my normal login procedure to my provider,
    manually executing the script that is shown later]

   Switching to PPP.
   ppp ON myhost> Packet mode
   PPP ON myhost>

Yes!  I am now able to use another tty to telnet, ftp, whatever.  It works well.

Why will it work manually and not with a script?  I've looked at the
ppp.log and it is taking the script OK (accepting username and password),
but issues a SIGHUP shortly after the password is sent.  Here's a copy of
a failed ppp.log session:

   06-26 10:27:59 [232] Using interface: tun0
   06-26 10:27:59 [232] PPP Started.
   06-26 10:29:24 [232] Expecting 
   06-26 10:29:24 [232] sending: ATZ
   06-26 10:29:24 [232] Expecting OK-AT-OK
   06-26 10:29:24 [232] Wait for (5): OK --> OK
   06-26 10:29:26 [232] sending: ATDT7654321
   06-26 10:29:26 [232] Expecting CONNECT
   06-26 10:29:26 [232] Wait for (40): CONNECT --> CONNECT
   06-26 10:29:52 [232] Expecting user:-\r-user:
   06-26 10:29:52 [232] Wait for (10): user: --> user:
   06-26 10:29:58 [232] sending: MyAccountName
   06-26 10:29:58 [232] Expecting word:
   06-26 10:29:58 [232] Wait for (10): word: --> word:
   06-26 10:29:58 [232] sending: MyPassword
   06-26 10:29:59 [232] LCP: state change Initial --> Closed
   06-26 10:29:59 [232] LCP: state change Closed --> Stopped
   06-26 10:29:59 [232] SIGHUP
   06-26 10:30:00 [232] PPP Terminated.

I've enclosed my /etc/ppp/ppp.conf below.  I do connect dynamically, and
have configured my /etc/sysconfig, /etc/hosts, /etc/host.conf,
/etc/resolv/conf, /etc/ppp/ppp.conf, /etc/ppp/ppp.linkup as prescribed by
Myong In Kye (mikye@jove.acs.unt.edu) in his posting from June 1, 1996.

Jay Yanek


#################################################################
#
#     PPP  Sample Configuration File
#
#    Written by Toshiharu OHNO
#
# $Id: ppp.conf.sample,v 1.3 1995/04/22 17:14:21 amurai Exp $
#
#################################################################
#
# Default setup. Executed always when PPP is invoked.
#
default:
 set line /dev/cuaa1
 set speed 19200
 set parity none
 disable lqr pred1
 deny lqr predl
 set debug 0 1 2 3 4
 set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" ATZ OK-AT-OK
\\dATDT\\T TIMEOUT 40 CONNECT"
#
#  phone, login name, and password have been changed to protect the innocent ;)
#
provider:
 set phone 7654321
 accept pap
 set authname MyAccountName
 set authkey MyPassword
 set login "TIMEOUT 10 user:-\\r-user: MyAccountName word: MyPassword"
 set timeout 0
 set openmode active
 set ifaddr 0 0