From owner-freebsd-questions Tue Feb 16 22:49:21 1999 Delivered-To: freebsd-questions@freebsd.org Received: from mailb.telia.com (mailb.telia.com [194.22.194.6]) by hub.freebsd.org (Postfix) with ESMTP id 3600110EAE for ; Tue, 16 Feb 1999 22:49:17 -0800 (PST) (envelope-from mark.hannon@stockholm.mail.telia.com) Received: from d1o1.telia.com (root@d1o1.telia.com [195.67.240.241]) by mailb.telia.com (8.8.8/8.8.8) with ESMTP id HAA14088; Wed, 17 Feb 1999 07:46:45 +0100 (CET) Received: from doorway.home.lan (t8o1p58.telia.com [195.67.241.238]) by d1o1.telia.com (8.8.8/8.8.5) with ESMTP id HAA15863; Wed, 17 Feb 1999 07:46:43 +0100 (CET) Received: from stockholm.mail.telia.com (putte.home.lan [192.168.255.2]) by doorway.home.lan (8.9.2/8.8.7) with ESMTP id HAA84765; Wed, 17 Feb 1999 07:45:06 +0100 (CET) (envelope-from mark.hannon@stockholm.mail.telia.com) Message-ID: <36CA6563.E754ABC4@stockholm.mail.telia.com> Date: Wed, 17 Feb 1999 07:44:51 +0100 From: Mark Hannon X-Mailer: Mozilla 4.06 [en] (Win98; I) MIME-Version: 1.0 To: Brian Somers Cc: freebsd-questions@freebsd.org Subject: Re: ppp/chat no longer able to access /dev/tty from exec References: <199902161906.TAA00594@keep.lan.Awfulhak.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, Thanks for the tip. I need to use the ppp interactive mode (as most of the time this is run from a windows box via telnet). I modified the suggested script below like this: #!/bin/sh if [ $0 = "/etc/ppp/prompt_passwd" ]; then echo -n "Password: " >&3 else echo " " >&3 echo -n "User: " >&3 fi read x <&3 echo $x echo $x >&2 exit 0 I then hardlinked that to /etc/ppp/prompt_passwd and prompt_user. From my ppp.conf file I call first prompt_user and then prompt_passwd. Regards/Mark Brian Somers wrote: > You may want to look at the latest version at > > http://www.Awfulhak.org/ppp.html > > There's an entry in the ppp.conf.sample file that uses a script > called login-auth (also supplied) for exactly this purpose. > > The end result is that when ppp connects, it throws a login prompt up > on your X display. > > If you want to stick with your existing stuff, you need to do the > echo & read from descriptor 3 now: > > #! /bin/sh > echo -n "($*) " >&3 > read x <&3 > echo $x > > but this presumes that you've started ppp in interactive mode (it's > got a controlling terminal). > > > Hi, > > > > I have previously used the following scripts to dial > > into my employer. I am prompted for userid and a password > > (which is dynamically created for me by a little credit > > card security number generator). > > > > I haven't logged onto work for some months, and now, when > > I try to use my recently upgraded 3.0 box to do it the > > chat script doesn't work. The !/etc/ppp/prompt_password > > no longer attaches to the ppp terminal but connects to > > some other file descriptors. Is there any way to get the > > old behaviour back? (I had a brief look at the code but > > got quickly overwhelmed...) > > > > Here are the relevant portions: > > > > >From ppp.conf: > > set login "TIMEOUT 5 Username:-\\r-Username: > > !/etc/ppp/prompt_passwd word: !/etc/ppp/prompt_passwd ~" > > > > > > doorway:~> more /etc/ppp/prompt_passwd > > #!/bin/sh > > echo -n "($*) " >&2 > > read x > > echo $x > > exit 0 > > > > Thanks, Mark > > -- > Brian > > Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message