[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: pap and diald



Richard Morin wrote:
> 
> Hi folks,
> I was wondering if anyone who uses diald could help me with pap
> authentication.  I've just changed ISP's and of course they are an Nt
> shop who are changing over to solaris...
> 
> I was able to figure out my connection problems with minicom at my
> old ISP , but here, it gets to the point of telling  me the speed and stuff
> about the connection, and dies shortly after.  No login prompt, no
> cursor, nada...
> 
> How do I pass the info to the server?  or get it to tell me what it
> wants?  pap is something I haven't had to worry about till now....
> 
> Rich M
> 

On systems which do PAP rather than the standard login/password dialog,
they sometimes just wait there for PPP to start coming from your side
and if they don't get it within a certain amount of time they just 
give up and hang up. In this case you first need to change your diald
chat script so that it exits successfully after receiving 'CONNECT'.
This way pppd will start sending CONFREQs immediately. In order to get
PAP working you first need the file /etc/ppp/pap-secrets. This file
contains the passwords which pppd will use. Which password is used
depends on the local and remote "names". The local name will be whatever
your login account name is. Let's say I'm connecting to Joe's ISP with
pap, and my account login is FOO while my password is BAR. I will put
a line in /etc/ppp/pap-secrets like this:

FOO	*	BAR

I'm not sure that it matters, but since I've had trouble with
pap-secrets
in the past, separate the tokens on this line with a tab, not spaces.
This line means that for any connection where my local name is FOO,
send the password BAR. I think the remote name is based upon the 
remote IP address or something, in any case don't worry about it.
The next thing to do is to tell pppd what your user name is (so that
it can find this entry in pap-secrets).  This is accomplished with
the pppd option 'user <user name>'. If you only connect to one 
account with pppd, you could put this option in your /etc/ppp/options
file. Peronally I don't, so the option must be put on the pppd 
command line. With diald, 'extra' options for the pppd command line
must be passed on the diald command line. And with Debian, since diald
is started in an /etc/init.d script, you must use the proper syntax
in /etc/init.d/diald to get this right. Here's a (slightly modified
to protect the innocent) excerpt from my /etc/init.d/diald file
(WATCH OUT for my mail-client's reckless wrapping of lines)

case "$1" in
  start)
    if [ $run_diald = 1 ]
    then
      start-stop-daemon --start --verbose --exec /usr/sbin/diald --
/dev/ttyS1 -
f /etc/diald/diald.options -- user FOO
    fi
    ;;

Notice how the bare "--" appears twice? start-stop-daemon requires this
to tell
it that "/dev/ttyS1 -f /etc/diald/diald.options -- user FOO" are to be
passed
as command line parameters to /usr/sbin/diald and likewise diald
interprets
the "-- user FOO" to mean that "user FOO" is supposed to be passed on as
a 
command line parameters to pppd. Complicated? You bet. diald could have 
handled this in a config file, too bad it doesn't. Anyway just do it
like
this and you should be ok. If this stuff doesn't work, turn on pppd's
debugging
and post the event trace to the list or to me.

-- 
Jens B. Jorgensen
jjorgens@bdsinc.com


Reply to: