linux-ppp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Hot to perform a null login?
@ 2006-02-01  5:06 Matthew Percival
  2006-02-01  5:16 ` Bill Unruh
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: Matthew Percival @ 2006-02-01  5:06 UTC (permalink / raw)
  To: linux-ppp

G'Day,

	I am trying to use a GSM modem to create a GPRS connection via pppd.  I
have managed to work most things out, but am finding authentication a
stumbling block: I need to send a blank name and password, but pppd is
sending my local name (which is obviously being treated as incorrect by
the server).  Looking through the pppd code, I came across null_login(),
which looks like it may provide what I need, but I cannot seem to get
pppd to call it --- obviously I am misunderstanding something along the
way, and have something set up wrong.

	Could someone please tell me how to configure pppd to reply to a PAP
request with a blank name and password?  I'll include dumps of my pppd
and chat scripts below, in case they are relevant.

	-- Matthew

/etc/ppp/peers/gprs-script:
115200
noauth
debug
crtscts
noipdefault
modem
usepeerdns
defaultroute
pap-max-authreq 3
connect-delay 10000
connect '/usr/sbin/chat -v -f /etc/ppp/gprs-init'

/etc/ppp/gprs-init:
TIMEOUT 10
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "BUSY"
ABORT "ERROR"
"" AT+WOPEN=1 OK
\dAT+CPIN? TIMEOUT 5 READY-\dAT+CPINU69-OK
\dAT+CPIN? TIMEOUT 10 READY
\dAT+CREG=1 OK
\dAT+CGDCONT=1,"IP","telstra.internet" OK
\dAT+CGDATA=1 ""


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Hot to perform a null login?
  2006-02-01  5:06 Hot to perform a null login? Matthew Percival
@ 2006-02-01  5:16 ` Bill Unruh
  2006-02-01  5:34 ` Matthew Percival
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Bill Unruh @ 2006-02-01  5:16 UTC (permalink / raw)
  To: linux-ppp

On Wed, 1 Feb 2006, Matthew Percival wrote:

> G'Day,
>
> 	I am trying to use a GSM modem to create a GPRS connection via pppd.  I
> have managed to work most things out, but am finding authentication a
> stumbling block: I need to send a blank name and password, but pppd is
> sending my local name (which is obviously being treated as incorrect by
> the server).  Looking through the pppd code, I came across null_login(),
> which looks like it may provide what I need, but I cannot seem to get
> pppd to call it --- obviously I am misunderstanding something along the
> way, and have something set up wrong.
>
> 	Could someone please tell me how to configure pppd to reply to a PAP
> request with a blank name and password?  I'll include dumps of my pppd
> and chat scripts below, in case they are relevant.

Why would you want to do this? It is not at all clear that anything can
understand a null login name.  Why do you think you need to send a null
username

You might have a line

''    GSM  ''
in /etc/pap-secrets and have
user ''
as an option for pppd.



>
> 	-- Matthew
>
> /etc/ppp/peers/gprs-script:
> 115200
> noauth
> debug
> crtscts
> noipdefault
> modem
> usepeerdns
> defaultroute
> pap-max-authreq 3
> connect-delay 10000
> connect '/usr/sbin/chat -v -f /etc/ppp/gprs-init'
>
> /etc/ppp/gprs-init:
> TIMEOUT 10
> ABORT "NO CARRIER"
> ABORT "NO DIALTONE"
> ABORT "BUSY"
> ABORT "ERROR"
> "" AT+WOPEN=1 OK
> \dAT+CPIN? TIMEOUT 5 READY-\dAT+CPINU69-OK
> \dAT+CPIN? TIMEOUT 10 READY
> \dAT+CREG=1 OK
> \dAT+CGDCONT=1,"IP","telstra.internet" OK
> \dAT+CGDATA=1 ""
>

How about giving us pppd debug output.


> -
> To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

-- 
William G. Unruh   |  Canadian Institute for|     Tel: +1(604)822-3273
Physics&Astronomy  |     Advanced Research  |     Fax: +1(604)822-5324
UBC, Vancouver,BC  |   Program in Cosmology |     unruh@physics.ubc.ca
Canada V6T 1Z1     |      and Gravity       |  www.theory.physics.ubc.ca/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Hot to perform a null login?
  2006-02-01  5:06 Hot to perform a null login? Matthew Percival
  2006-02-01  5:16 ` Bill Unruh
@ 2006-02-01  5:34 ` Matthew Percival
  2006-02-01  6:00 ` Bill Unruh
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Matthew Percival @ 2006-02-01  5:34 UTC (permalink / raw)
  To: linux-ppp

G'Day,

> Why would you want to do this? It is not at all clear that anything can
> understand a null login name.  Why do you think you need to send a null
> username

	Apparently that is what is required for the server I am connecting to.
You would need to ask the provider for why or how: I am just trying to
do what I have been told.

> You might have a line
> 
> ''    GSM  ''
> in /etc/pap-secrets and have
> user ''
> as an option for pppd.

	I just tried that, but it still defaulted to my local name.
From /var/log/syslog:
Feb  1 16:28:29 localhost pppd[15869]: sent [PAP AuthReq id=0x1
user="matthew" password=<hidden>]

	-- Matthew


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Hot to perform a null login?
  2006-02-01  5:06 Hot to perform a null login? Matthew Percival
  2006-02-01  5:16 ` Bill Unruh
  2006-02-01  5:34 ` Matthew Percival
@ 2006-02-01  6:00 ` Bill Unruh
  2006-02-01  6:12 ` James Cameron
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Bill Unruh @ 2006-02-01  6:00 UTC (permalink / raw)
  To: linux-ppp

On Wed, 1 Feb 2006, Matthew Percival wrote:

> G'Day,
>
>> Why would you want to do this? It is not at all clear that anything can
>> understand a null login name.  Why do you think you need to send a null
>> username
>
> 	Apparently that is what is required for the server I am connecting to.
> You would need to ask the provider for why or how: I am just trying to
> do what I have been told.

Surely not.


>
>> You might have a line
>>
>> ''    GSM  ''
>> in /etc/pap-secrets and have
>> user ''
>> as an option for pppd.
>
> 	I just tried that, but it still defaulted to my local name.
>> From /var/log/syslog:
> Feb  1 16:28:29 localhost pppd[15869]: sent [PAP AuthReq id=0x1
> user="matthew" password=<hidden>]

Uh, you have the login  option set.  Don't.

However a blank username could well get badly interpreted by various
things. I think you need tocheck again as to what they really want. a null
username makes no sense at all.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Hot to perform a null login?
  2006-02-01  5:06 Hot to perform a null login? Matthew Percival
                   ` (2 preceding siblings ...)
  2006-02-01  6:00 ` Bill Unruh
@ 2006-02-01  6:12 ` James Cameron
  2006-02-01 11:40 ` James Carlson
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: James Cameron @ 2006-02-01  6:12 UTC (permalink / raw)
  To: linux-ppp

Given that it's Telstra, the dominant carrier in Australia, requiring a
null username on a GSM call is not at all unusual, and probably
something that Matthew won't ever be able to work around as far as the
provider is concerned.  Authentication and billing is done using the GSM
number, and not the authentication username.  On the CDMA modem that I
have with the same carrier, a non-null shared username is used.
Everybody uses the same username as far as I can tell.

Matthew, could you show us a debug log of the connection attempt?  Bill
asked for that before, and it would be really helpful.  Add the option
debug to the command line you use to start pppd.

I agree with Bill that the "sent [PAP AuthReq" suggests that your end is
attempting to authenticate the peer.  Use the dump option to find out
where the options are coming from.

-- 
James Cameron
http://ftp.hp.com.au/sigs/jc/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Hot to perform a null login?
  2006-02-01  5:06 Hot to perform a null login? Matthew Percival
                   ` (3 preceding siblings ...)
  2006-02-01  6:12 ` James Cameron
@ 2006-02-01 11:40 ` James Carlson
  2006-02-01 11:45 ` James Cameron
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: James Carlson @ 2006-02-01 11:40 UTC (permalink / raw)
  To: linux-ppp

James Cameron writes:
> I agree with Bill that the "sent [PAP AuthReq" suggests that your end is
> attempting to authenticate the peer.  Use the dump option to find out
> where the options are coming from.

No.  With PAP, the authenticatee ("client") sends PAP Authenticate-
Request to the authenticator ("server").  It's the reverse of the
somewhat more familiar CHAP procedure.

-- 
James Carlson         42.703N 71.076W         <carlsonj@workingcode.com>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Hot to perform a null login?
  2006-02-01  5:06 Hot to perform a null login? Matthew Percival
                   ` (4 preceding siblings ...)
  2006-02-01 11:40 ` James Carlson
@ 2006-02-01 11:45 ` James Cameron
  2006-02-01 22:09 ` Matthew Percival
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: James Cameron @ 2006-02-01 11:45 UTC (permalink / raw)
  To: linux-ppp

On Wed, Feb 01, 2006 at 06:40:50AM -0500, James Carlson wrote:
> No.  With PAP, the authenticatee ("client") sends PAP Authenticate-
> Request to the authenticator ("server").  It's the reverse of the
> somewhat more familiar CHAP procedure.

Ah yes, agreed.  My mistake.  Too much PPTP for me.  ;-}

-- 
James Cameron

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Hot to perform a null login?
  2006-02-01  5:06 Hot to perform a null login? Matthew Percival
                   ` (5 preceding siblings ...)
  2006-02-01 11:45 ` James Cameron
@ 2006-02-01 22:09 ` Matthew Percival
  2006-02-01 22:26 ` Bill Unruh
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Matthew Percival @ 2006-02-01 22:09 UTC (permalink / raw)
  To: linux-ppp

G'Day,

> Matthew, could you show us a debug log of the connection attempt?  Bill
> asked for that before, and it would be really helpful.  Add the option
> debug to the command line you use to start pppd.

	Here's the full log from what I sent yesterday:

Feb  1 16:28:16 localhost chat[15870]: timeout set to 10 seconds
Feb  1 16:28:16 localhost chat[15870]: abort on (NO CARRIER)
Feb  1 16:28:16 localhost chat[15870]: abort on (NO DIALTONE)
Feb  1 16:28:16 localhost chat[15870]: abort on (BUSY)
Feb  1 16:28:16 localhost chat[15870]: abort on (ERROR)
Feb  1 16:28:16 localhost chat[15870]: send (AT+WOPEN=1^M)
Feb  1 16:28:16 localhost chat[15870]: expect (OK)
Feb  1 16:28:16 localhost chat[15870]: AT+WOPEN=1^M^M
Feb  1 16:28:16 localhost chat[15870]: OK
Feb  1 16:28:16 localhost chat[15870]:  -- got it 
Feb  1 16:28:16 localhost chat[15870]: send (\dAT+CPIN?^M)
Feb  1 16:28:18 localhost chat[15870]: timeout set to 5 seconds
Feb  1 16:28:18 localhost chat[15870]: expect (READY)
Feb  1 16:28:18 localhost chat[15870]: ^M
Feb  1 16:28:18 localhost chat[15870]: AT+CPIN?^M^M
Feb  1 16:28:18 localhost chat[15870]: +CPIN: SIM PIN^M
Feb  1 16:28:23 localhost chat[15870]: alarm
Feb  1 16:28:23 localhost chat[15870]: send (\dAT+CPIN=xxxx^M)
Feb  1 16:28:24 localhost chat[15870]: expect (OK)
Feb  1 16:28:24 localhost chat[15870]: AT+CPIN=xxxx^M^M
Feb  1 16:28:24 localhost chat[15870]: OK
Feb  1 16:28:24 localhost chat[15870]:  -- got it 
Feb  1 16:28:24 localhost chat[15870]: send (\dAT+CPIN?^M)
Feb  1 16:28:26 localhost chat[15870]: timeout set to 10 seconds
Feb  1 16:28:26 localhost chat[15870]: expect (READY)
Feb  1 16:28:26 localhost chat[15870]: ^M
Feb  1 16:28:26 localhost chat[15870]: AT+CPIN?^M^M
Feb  1 16:28:26 localhost chat[15870]: +CPIN: READY
Feb  1 16:28:26 localhost chat[15870]:  -- got it 
Feb  1 16:28:26 localhost chat[15870]: send (\dAT+CREG=1^M)
Feb  1 16:28:27 localhost chat[15870]: expect (OK)
Feb  1 16:28:27 localhost chat[15870]: ^M
Feb  1 16:28:27 localhost chat[15870]: AT+CREG=1^M^M
Feb  1 16:28:27 localhost chat[15870]: OK
Feb  1 16:28:27 localhost chat[15870]:  -- got it 
Feb  1 16:28:27 localhost chat[15870]: send (\dAT
+CGDCONT=1,"IP","telstra.internet"^M)
Feb  1 16:28:28 localhost chat[15870]: expect (OK)
Feb  1 16:28:28 localhost chat[15870]: ^M
Feb  1 16:28:28 localhost chat[15870]: AT
+CGDCONT=1,"IP","telstra.internet"^M^M
Feb  1 16:28:28 localhost chat[15870]: OK
Feb  1 16:28:28 localhost chat[15870]:  -- got it 
Feb  1 16:28:28 localhost chat[15870]: send (\dAT+CGDATA=1^M)
Feb  1 16:28:29 localhost pppd[15869]: Serial connection established.
Feb  1 16:28:29 localhost pppd[15869]: using channel 12
Feb  1 16:28:29 localhost pppd[15869]: Using interface ppp0
Feb  1 16:28:29 localhost pppd[15869]: Connect: ppp0 <--> /dev/ttyS0
Feb  1 16:28:29 localhost pppd[15869]: rcvd [LCP ConfReq id=0x1 <mru
1500> <asyncmap 0x0> <pcomp> <accomp> <auth pap>]
Feb  1 16:28:29 localhost pppd[15869]: sent [LCP ConfReq id=0x1
<asyncmap 0x0> <magic 0xbab2643b> <pcomp> <accomp>]
Feb  1 16:28:29 localhost pppd[15869]: sent [LCP ConfAck id=0x1 <mru
1500> <asyncmap 0x0> <pcomp> <accomp> <auth pap>]
Feb  1 16:28:29 localhost pppd[15869]: rcvd [LCP ConfRej id=0x1 <magic
0xbab2643b>]
Feb  1 16:28:29 localhost pppd[15869]: sent [LCP ConfReq id=0x2
<asyncmap 0x0> <pcomp> <accomp>]
Feb  1 16:28:29 localhost pppd[15869]: rcvd [LCP ConfAck id=0x2
<asyncmap 0x0> <pcomp> <accomp>]
Feb  1 16:28:29 localhost pppd[15869]: sent [PAP AuthReq id=0x1
user="matthew" password=<hidden>]
Feb  1 16:28:32 localhost pppd[15869]: sent [PAP AuthReq id=0x2
user="matthew" password=<hidden>]
Feb  1 16:28:35 localhost pppd[15869]: sent [PAP AuthReq id=0x3
user="matthew" password=<hidden>]
Feb  1 16:28:38 localhost pppd[15869]: No response to PAP
authenticate-requests
Feb  1 16:28:38 localhost pppd[15869]: sent [LCP TermReq id=0x3 "Failed
to authenticate ourselves to peer"]
Feb  1 16:28:38 localhost pppd[15869]: rcvd [PAP AuthNak id=0x1 "Sorry
auth. failed!"]
Feb  1 16:28:38 localhost pppd[15869]: Discarded non-LCP packet when LCP
not open
Feb  1 16:28:39 localhost pppd[15869]: rcvd [LCP TermReq id=0x2]
Feb  1 16:28:39 localhost pppd[15869]: sent [LCP TermAck id=0x2]
Feb  1 16:28:39 localhost pppd[15869]: Hangup (SIGHUP)
Feb  1 16:28:39 localhost pppd[15869]: Modem hangup
Feb  1 16:28:39 localhost pppd[15869]: Connection terminated.
Feb  1 16:28:40 localhost pppd[15869]: Exit.

> I agree with Bill that the "sent [PAP AuthReq" suggests that your end is
> attempting to authenticate the peer.  Use the dump option to find out
> where the options are coming from.

pppd options in effect:
debug debug             # (from /etc/ppp/peers/gprs-script)
connect-delay 10000             # (from /etc/ppp/peers/gprs-script)
dump            # (from command line)
noauth          # (from /etc/ppp/peers/gprs-script)
/dev/ttyS0              # (from command line)
115200          # (from /etc/ppp/peers/gprs-script)
lock            # (from /etc/ppp/options)
connect /usr/sbin/chat -v -f /etc/ppp/gprs-init         #
(from /etc/ppp/peers/gprs-script)
crtscts         # (from /etc/ppp/peers/gprs-script)
modem           # (from /etc/ppp/peers/gprs-script)
asyncmap 0              # (from /etc/ppp/options)
hide-password           # (from /etc/ppp/options)
pap-max-authreq 3               # (from /etc/ppp/peers/gprs-script)
noipdefault             # (from /etc/ppp/peers/gprs-script)
defaultroute            # (from /etc/ppp/peers/gprs-script)
proxyarp                # (from /etc/ppp/options)
usepeerdns              # (from /etc/ppp/peers/gprs-script)
noipx           # (from /etc/ppp/options)

	Thanks,

	Matthew


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Hot to perform a null login?
  2006-02-01  5:06 Hot to perform a null login? Matthew Percival
                   ` (6 preceding siblings ...)
  2006-02-01 22:09 ` Matthew Percival
@ 2006-02-01 22:26 ` Bill Unruh
  2006-02-01 22:29 ` Bill Unruh
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Bill Unruh @ 2006-02-01 22:26 UTC (permalink / raw)
  To: linux-ppp


OK, they ask for pap, and when you send them pap, they refuse to respond.
The problem is at the other end. There is nothing you can do. Shout at
them.
Now maybe it takes them more than 9 sec to respond. I see no reason why,
but you need to take it up with them.

It may be that you have the wrong username or password and this is their
way of letting you know.






On Thu, 2 Feb 2006, Matthew Percival wrote:

> G'Day,
>
>> Matthew, could you show us a debug log of the connection attempt?  Bill
>> asked for that before, and it would be really helpful.  Add the option
>> debug to the command line you use to start pppd.
>
> 	Here's the full log from what I sent yesterday:
>
> Feb  1 16:28:16 localhost chat[15870]: timeout set to 10 seconds
> Feb  1 16:28:16 localhost chat[15870]: abort on (NO CARRIER)
> Feb  1 16:28:16 localhost chat[15870]: abort on (NO DIALTONE)
> Feb  1 16:28:16 localhost chat[15870]: abort on (BUSY)
> Feb  1 16:28:16 localhost chat[15870]: abort on (ERROR)
> Feb  1 16:28:16 localhost chat[15870]: send (AT+WOPEN=1^M)
> Feb  1 16:28:16 localhost chat[15870]: expect (OK)
> Feb  1 16:28:16 localhost chat[15870]: AT+WOPEN=1^M^M
> Feb  1 16:28:16 localhost chat[15870]: OK
> Feb  1 16:28:16 localhost chat[15870]:  -- got it
> Feb  1 16:28:16 localhost chat[15870]: send (\dAT+CPIN?^M)
> Feb  1 16:28:18 localhost chat[15870]: timeout set to 5 seconds
> Feb  1 16:28:18 localhost chat[15870]: expect (READY)
> Feb  1 16:28:18 localhost chat[15870]: ^M
> Feb  1 16:28:18 localhost chat[15870]: AT+CPIN?^M^M
> Feb  1 16:28:18 localhost chat[15870]: +CPIN: SIM PIN^M
> Feb  1 16:28:23 localhost chat[15870]: alarm
> Feb  1 16:28:23 localhost chat[15870]: send (\dAT+CPIN=xxxx^M)
> Feb  1 16:28:24 localhost chat[15870]: expect (OK)
> Feb  1 16:28:24 localhost chat[15870]: AT+CPIN=xxxx^M^M
> Feb  1 16:28:24 localhost chat[15870]: OK
> Feb  1 16:28:24 localhost chat[15870]:  -- got it
> Feb  1 16:28:24 localhost chat[15870]: send (\dAT+CPIN?^M)
> Feb  1 16:28:26 localhost chat[15870]: timeout set to 10 seconds
> Feb  1 16:28:26 localhost chat[15870]: expect (READY)
> Feb  1 16:28:26 localhost chat[15870]: ^M
> Feb  1 16:28:26 localhost chat[15870]: AT+CPIN?^M^M
> Feb  1 16:28:26 localhost chat[15870]: +CPIN: READY
> Feb  1 16:28:26 localhost chat[15870]:  -- got it
> Feb  1 16:28:26 localhost chat[15870]: send (\dAT+CREG=1^M)
> Feb  1 16:28:27 localhost chat[15870]: expect (OK)
> Feb  1 16:28:27 localhost chat[15870]: ^M
> Feb  1 16:28:27 localhost chat[15870]: AT+CREG=1^M^M
> Feb  1 16:28:27 localhost chat[15870]: OK
> Feb  1 16:28:27 localhost chat[15870]:  -- got it
> Feb  1 16:28:27 localhost chat[15870]: send (\dAT
> +CGDCONT=1,"IP","telstra.internet"^M)
> Feb  1 16:28:28 localhost chat[15870]: expect (OK)
> Feb  1 16:28:28 localhost chat[15870]: ^M
> Feb  1 16:28:28 localhost chat[15870]: AT
> +CGDCONT=1,"IP","telstra.internet"^M^M
> Feb  1 16:28:28 localhost chat[15870]: OK
> Feb  1 16:28:28 localhost chat[15870]:  -- got it
> Feb  1 16:28:28 localhost chat[15870]: send (\dAT+CGDATA=1^M)
> Feb  1 16:28:29 localhost pppd[15869]: Serial connection established.
> Feb  1 16:28:29 localhost pppd[15869]: using channel 12
> Feb  1 16:28:29 localhost pppd[15869]: Using interface ppp0
> Feb  1 16:28:29 localhost pppd[15869]: Connect: ppp0 <--> /dev/ttyS0
> Feb  1 16:28:29 localhost pppd[15869]: rcvd [LCP ConfReq id=0x1 <mru
> 1500> <asyncmap 0x0> <pcomp> <accomp> <auth pap>]
> Feb  1 16:28:29 localhost pppd[15869]: sent [LCP ConfReq id=0x1
> <asyncmap 0x0> <magic 0xbab2643b> <pcomp> <accomp>]
> Feb  1 16:28:29 localhost pppd[15869]: sent [LCP ConfAck id=0x1 <mru
> 1500> <asyncmap 0x0> <pcomp> <accomp> <auth pap>]
> Feb  1 16:28:29 localhost pppd[15869]: rcvd [LCP ConfRej id=0x1 <magic
> 0xbab2643b>]
> Feb  1 16:28:29 localhost pppd[15869]: sent [LCP ConfReq id=0x2
> <asyncmap 0x0> <pcomp> <accomp>]
> Feb  1 16:28:29 localhost pppd[15869]: rcvd [LCP ConfAck id=0x2
> <asyncmap 0x0> <pcomp> <accomp>]
> Feb  1 16:28:29 localhost pppd[15869]: sent [PAP AuthReq id=0x1
> user="matthew" password=<hidden>]
> Feb  1 16:28:32 localhost pppd[15869]: sent [PAP AuthReq id=0x2
> user="matthew" password=<hidden>]
> Feb  1 16:28:35 localhost pppd[15869]: sent [PAP AuthReq id=0x3
> user="matthew" password=<hidden>]
> Feb  1 16:28:38 localhost pppd[15869]: No response to PAP
> authenticate-requests
> Feb  1 16:28:38 localhost pppd[15869]: sent [LCP TermReq id=0x3 "Failed
> to authenticate ourselves to peer"]
> Feb  1 16:28:38 localhost pppd[15869]: rcvd [PAP AuthNak id=0x1 "Sorry
> auth. failed!"]
> Feb  1 16:28:38 localhost pppd[15869]: Discarded non-LCP packet when LCP
> not open
> Feb  1 16:28:39 localhost pppd[15869]: rcvd [LCP TermReq id=0x2]
> Feb  1 16:28:39 localhost pppd[15869]: sent [LCP TermAck id=0x2]
> Feb  1 16:28:39 localhost pppd[15869]: Hangup (SIGHUP)
> Feb  1 16:28:39 localhost pppd[15869]: Modem hangup
> Feb  1 16:28:39 localhost pppd[15869]: Connection terminated.
> Feb  1 16:28:40 localhost pppd[15869]: Exit.
>
>> I agree with Bill that the "sent [PAP AuthReq" suggests that your end is
>> attempting to authenticate the peer.  Use the dump option to find out
>> where the options are coming from.
>
> pppd options in effect:
> debug debug             # (from /etc/ppp/peers/gprs-script)
> connect-delay 10000             # (from /etc/ppp/peers/gprs-script)
> dump            # (from command line)
> noauth          # (from /etc/ppp/peers/gprs-script)
> /dev/ttyS0              # (from command line)
> 115200          # (from /etc/ppp/peers/gprs-script)
> lock            # (from /etc/ppp/options)
> connect /usr/sbin/chat -v -f /etc/ppp/gprs-init         #
> (from /etc/ppp/peers/gprs-script)
> crtscts         # (from /etc/ppp/peers/gprs-script)
> modem           # (from /etc/ppp/peers/gprs-script)
> asyncmap 0              # (from /etc/ppp/options)
> hide-password           # (from /etc/ppp/options)
> pap-max-authreq 3               # (from /etc/ppp/peers/gprs-script)
> noipdefault             # (from /etc/ppp/peers/gprs-script)
> defaultroute            # (from /etc/ppp/peers/gprs-script)
> proxyarp                # (from /etc/ppp/options)
> usepeerdns              # (from /etc/ppp/peers/gprs-script)
> noipx           # (from /etc/ppp/options)
>
> 	Thanks,
>
> 	Matthew
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

-- 
William G. Unruh   |  Canadian Institute for|     Tel: +1(604)822-3273
Physics&Astronomy  |     Advanced Research  |     Fax: +1(604)822-5324
UBC, Vancouver,BC  |   Program in Cosmology |     unruh@physics.ubc.ca
Canada V6T 1Z1     |      and Gravity       |  www.theory.physics.ubc.ca/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Hot to perform a null login?
  2006-02-01  5:06 Hot to perform a null login? Matthew Percival
                   ` (7 preceding siblings ...)
  2006-02-01 22:26 ` Bill Unruh
@ 2006-02-01 22:29 ` Bill Unruh
  2006-02-01 22:40 ` James Carlson
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Bill Unruh @ 2006-02-01 22:29 UTC (permalink / raw)
  To: linux-ppp

PS:

> pap-max-authreq 3               # (from /etc/ppp/peers/gprs-script)

Make this one 5 or 7 to make sure that it is not just a timeout.


> defaultroute            # (from /etc/ppp/peers/gprs-script)
> proxyarp                # (from /etc/ppp/options)

It makes no sense to have both proxyarp and defaultroute. GEt rid of the
proxyarp.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Hot to perform a null login?
  2006-02-01  5:06 Hot to perform a null login? Matthew Percival
                   ` (8 preceding siblings ...)
  2006-02-01 22:29 ` Bill Unruh
@ 2006-02-01 22:40 ` James Carlson
  2006-02-01 23:03 ` Matthew Percival
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: James Carlson @ 2006-02-01 22:40 UTC (permalink / raw)
  To: linux-ppp

Bill Unruh writes:
> > defaultroute            # (from /etc/ppp/peers/gprs-script)
> > proxyarp                # (from /etc/ppp/options)
> 
> It makes no sense to have both proxyarp and defaultroute. GEt rid of the
> proxyarp.

That's not true.  It's plausible to need both in some situations.

That doesn't mean he does, though.  Most users (particularly those
dialing into an ISP as an individual user) do _not_ want or need
proxyarp.

-- 
James Carlson         42.703N 71.076W         <carlsonj@workingcode.com>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Hot to perform a null login?
  2006-02-01  5:06 Hot to perform a null login? Matthew Percival
                   ` (9 preceding siblings ...)
  2006-02-01 22:40 ` James Carlson
@ 2006-02-01 23:03 ` Matthew Percival
  2006-02-01 23:03 ` James Cameron
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Matthew Percival @ 2006-02-01 23:03 UTC (permalink / raw)
  To: linux-ppp

G'Day,

> > pap-max-authreq 3               # (from /etc/ppp/peers/gprs-script)
> 
> Make this one 5 or 7 to make sure that it is not just a timeout.

	I originally had this at the default (10), and later reduced it to cut
out a little bit of time.

> > defaultroute            # (from /etc/ppp/peers/gprs-script)
> > proxyarp                # (from /etc/ppp/options)
> 
> It makes no sense to have both proxyarp and defaultroute. GEt rid of the
> proxyarp.


	proxyarp was in there by default: I had simply not touched it.  I just
checked what it does now, and it is not something I need, so I have
commented it out.

I now have the following options:
debug debug             # (from /etc/ppp/peers/gprs-script)
connect-delay 10000             # (from /etc/ppp/peers/gprs-script)
dump            # (from command line)
noauth          # (from /etc/ppp/peers/gprs-script)
/dev/ttyS0              # (from command line)
115200          # (from /etc/ppp/peers/gprs-script)
lock            # (from /etc/ppp/options)
connect /usr/sbin/chat -v -f /etc/ppp/gprs-init         #
(from /etc/ppp/peers/gprs-script)
crtscts         # (from /etc/ppp/peers/gprs-script)
modem           # (from /etc/ppp/peers/gprs-script)
asyncmap 0              # (from /etc/ppp/options)
hide-password           # (from /etc/ppp/options)
pap-max-authreq 10              # (from /etc/ppp/peers/gprs-script)
noipdefault             # (from /etc/ppp/peers/gprs-script)
defaultroute            # (from /etc/ppp/peers/gprs-script)
usepeerdns              # (from /etc/ppp/peers/gprs-script)
noipx           # (from /etc/ppp/options)

And the log shows:
Feb  2 09:52:26 localhost pppd[9081]: pppd 2.4.3 started by matthew, uid
1000
Feb  2 09:52:27 localhost chat[9082]: timeout set to 10 seconds
Feb  2 09:52:27 localhost chat[9082]: abort on (NO CARRIER)
Feb  2 09:52:27 localhost chat[9082]: abort on (NO DIALTONE)
Feb  2 09:52:27 localhost chat[9082]: abort on (BUSY)
Feb  2 09:52:27 localhost chat[9082]: abort on (ERROR)
Feb  2 09:52:27 localhost chat[9082]: send (AT+WOPEN=1^M)
Feb  2 09:52:27 localhost chat[9082]: expect (OK)
Feb  2 09:52:27 localhost chat[9082]: AT+WOPEN=1^M^M
Feb  2 09:52:27 localhost chat[9082]: OK
Feb  2 09:52:27 localhost chat[9082]:  -- got it 
Feb  2 09:52:27 localhost chat[9082]: send (\dAT+CPIN?^M)
Feb  2 09:52:28 localhost chat[9082]: timeout set to 5 seconds
Feb  2 09:52:28 localhost chat[9082]: expect (READY)
Feb  2 09:52:28 localhost chat[9082]: ^M
Feb  2 09:52:28 localhost chat[9082]: AT+CPIN?^M^M
Feb  2 09:52:28 localhost chat[9082]: +CPIN: SIM PIN^M
Feb  2 09:52:33 localhost chat[9082]: alarm
Feb  2 09:52:33 localhost chat[9082]: send (\dAT+CPINU69^M)
Feb  2 09:52:35 localhost chat[9082]: expect (OK)
Feb  2 09:52:35 localhost chat[9082]: AT+CPINU69^M^M
Feb  2 09:52:35 localhost chat[9082]: OK
Feb  2 09:52:35 localhost chat[9082]:  -- got it 
Feb  2 09:52:35 localhost chat[9082]: send (\dAT+CPIN?^M)
Feb  2 09:52:36 localhost chat[9082]: timeout set to 10 seconds
Feb  2 09:52:36 localhost chat[9082]: expect (READY)
Feb  2 09:52:36 localhost chat[9082]: ^M
Feb  2 09:52:36 localhost chat[9082]: AT+CPIN?^M^M
Feb  2 09:52:36 localhost chat[9082]: +CPIN: READY
Feb  2 09:52:36 localhost chat[9082]:  -- got it 
Feb  2 09:52:36 localhost chat[9082]: send (\dAT+CREG=1^M)
Feb  2 09:52:38 localhost chat[9082]: expect (OK)
Feb  2 09:52:38 localhost chat[9082]: ^M
Feb  2 09:52:38 localhost chat[9082]: AT+CREG=1^M^M
Feb  2 09:52:38 localhost chat[9082]: OK
Feb  2 09:52:38 localhost chat[9082]:  -- got it 
Feb  2 09:52:38 localhost chat[9082]: send (\dAT
+CGDCONT=1,"IP","telstra.internet"^M)
Feb  2 09:52:39 localhost chat[9082]: expect (OK)
Feb  2 09:52:39 localhost chat[9082]: ^M
Feb  2 09:52:39 localhost chat[9082]: AT
+CGDCONT=1,"IP","telstra.internet"^M^M
Feb  2 09:52:39 localhost chat[9082]: OK
Feb  2 09:52:39 localhost chat[9082]:  -- got it 
Feb  2 09:52:39 localhost chat[9082]: send (\dAT+CGDATA=1^M)
Feb  2 09:52:40 localhost pppd[9081]: Serial connection established.
Feb  2 09:52:40 localhost pppd[9081]: using channel 2
Feb  2 09:52:40 localhost pppd[9081]: Using interface ppp0
Feb  2 09:52:40 localhost pppd[9081]: Connect: ppp0 <--> /dev/ttyS0
Feb  2 09:52:40 localhost pppd[9081]: rcvd [LCP ConfReq id=0x1 <mru
1500> <asyncmap 0x0> <pcomp> <accomp> <auth pap>]
Feb  2 09:52:40 localhost pppd[9081]: sent [LCP ConfReq id=0x1 <asyncmap
0x0> <magic 0xa6a311d> <pcomp> <accomp>]
Feb  2 09:52:40 localhost pppd[9081]: sent [LCP ConfAck id=0x1 <mru
1500> <asyncmap 0x0> <pcomp> <accomp> <auth pap>]
Feb  2 09:52:40 localhost pppd[9081]: rcvd [LCP ConfRej id=0x1 <magic
0xa6a311d>]
Feb  2 09:52:40 localhost pppd[9081]: sent [LCP ConfReq id=0x2 <asyncmap
0x0> <pcomp> <accomp>]
Feb  2 09:52:40 localhost pppd[9081]: rcvd [LCP ConfAck id=0x2 <asyncmap
0x0> <pcomp> <accomp>]
Feb  2 09:52:40 localhost pppd[9081]: sent [PAP AuthReq id=0x1
user="matthew" password=<hidden>]
Feb  2 09:52:43 localhost pppd[9081]: sent [PAP AuthReq id=0x2
user="matthew" password=<hidden>]
Feb  2 09:52:46 localhost pppd[9081]: sent [PAP AuthReq id=0x3
user="matthew" password=<hidden>]
Feb  2 09:52:49 localhost pppd[9081]: sent [PAP AuthReq id=0x4
user="matthew" password=<hidden>]
Feb  2 09:52:52 localhost pppd[9081]: sent [PAP AuthReq id=0x5
user="matthew" password=<hidden>]
Feb  2 09:52:55 localhost pppd[9081]: sent [PAP AuthReq id=0x6
user="matthew" password=<hidden>]
Feb  2 09:52:58 localhost pppd[9081]: sent [PAP AuthReq id=0x7
user="matthew" password=<hidden>]
Feb  2 09:53:01 localhost pppd[9081]: sent [PAP AuthReq id=0x8
user="matthew" password=<hidden>]
Feb  2 09:53:04 localhost pppd[9081]: sent [PAP AuthReq id=0x9
user="matthew" password=<hidden>]
Feb  2 09:53:07 localhost pppd[9081]: sent [PAP AuthReq id=0xa
user="matthew" password=<hidden>]
Feb  2 09:53:10 localhost pppd[9081]: No response to PAP
authenticate-requests
Feb  2 09:53:10 localhost pppd[9081]: sent [LCP TermReq id=0x3 "Failed
to authenticate ourselves to peer"]
Feb  2 09:53:10 localhost pppd[9081]: rcvd [PAP AuthNak id=0xa "Sorry
auth. failed!"]
Feb  2 09:53:10 localhost pppd[9081]: Discarded non-LCP packet when LCP
not open
Feb  2 09:53:11 localhost pppd[9081]: rcvd [LCP TermReq id=0x2]
Feb  2 09:53:11 localhost pppd[9081]: sent [LCP TermAck id=0x2]
Feb  2 09:53:11 localhost pppd[9081]: Hangup (SIGHUP)
Feb  2 09:53:11 localhost pppd[9081]: Modem hangup
Feb  2 09:53:11 localhost pppd[9081]: Connection terminated.
Feb  2 09:53:12 localhost pppd[9081]: Exit.

	If it still looks like the problem is at the other end, I will try to
contact them, and see if I can actually get a response on this.

	Thanks for the assistance so far,

	Matthew


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Hot to perform a null login?
  2006-02-01  5:06 Hot to perform a null login? Matthew Percival
                   ` (10 preceding siblings ...)
  2006-02-01 23:03 ` Matthew Percival
@ 2006-02-01 23:03 ` James Cameron
  2006-02-01 23:13 ` James Cameron
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: James Cameron @ 2006-02-01 23:03 UTC (permalink / raw)
  To: linux-ppp

G'day Matthew,

I've checked the code, and a null username given to the user option is
overridden by the value given to the name option.  And the name option
defaults in the same way to the hostname or is forced to it if the
usehostname option is used.  

This is in auth_check_options(), line 1214 of auth.c CVS revision 1.108.

    /* Default our_name to hostname, and user to our_name */
    if (our_name[0] = 0 || usehostname)
	strlcpy(our_name, hostname, sizeof(our_name));
    if (user[0] = 0)
	strlcpy(user, our_name, sizeof(user));

Therefore it is not possible with the current code to offer a null
string for PAP authentication, since this matches the tests above.  To
achieve it, you will have to change the code and recompile.  I suggest
commenting out the last two lines I've quoted above, and then use

	user ''

as Bill initially suggested.

-- 
James Cameron
http://ftp.hp.com.au/sigs/jc/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Hot to perform a null login?
  2006-02-01  5:06 Hot to perform a null login? Matthew Percival
                   ` (11 preceding siblings ...)
  2006-02-01 23:03 ` James Cameron
@ 2006-02-01 23:13 ` James Cameron
  2006-02-02  3:33 ` Matthew Percival
  2006-02-02  6:38 ` Pieter Loubser
  14 siblings, 0 replies; 16+ messages in thread
From: James Cameron @ 2006-02-01 23:13 UTC (permalink / raw)
  To: linux-ppp

It might be possible to test without changing code if you add the
usehostname option and set the system hostname to a null string.

I'd tried this on my test system, got an error from the hostname
command, and presumed it wouldn't accept a null string.  After I'd sent
the previous mail, I found some things were no longer working, so I
checked and the change had taken effect, "hostname" by itself gave a
blank line.

So at the risk of breaking stuff that relies on a valid hostname, give
it a try.

-- 
James Cameron
http://ftp.hp.com.au/sigs/jc/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Hot to perform a null login?
  2006-02-01  5:06 Hot to perform a null login? Matthew Percival
                   ` (12 preceding siblings ...)
  2006-02-01 23:13 ` James Cameron
@ 2006-02-02  3:33 ` Matthew Percival
  2006-02-02  6:38 ` Pieter Loubser
  14 siblings, 0 replies; 16+ messages in thread
From: Matthew Percival @ 2006-02-02  3:33 UTC (permalink / raw)
  To: linux-ppp

G'Day,

	As Bill suggested, the problem was on the other end: something seems to
have gone wrong with the registration of the SIM card --- I am guessing
that the SIM PIN was not registered correctly, as James suggested that
this was how they identify a user.  By swapping a different SIM into the
modem, it would then connect with the blank username and password.

	Thanks for the advice and assistance with this issue: I would probably
not have been able to resolve it without your input.

	-- Matthew


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Hot to perform a null login?
  2006-02-01  5:06 Hot to perform a null login? Matthew Percival
                   ` (13 preceding siblings ...)
  2006-02-02  3:33 ` Matthew Percival
@ 2006-02-02  6:38 ` Pieter Loubser
  14 siblings, 0 replies; 16+ messages in thread
From: Pieter Loubser @ 2006-02-02  6:38 UTC (permalink / raw)
  To: linux-ppp



I setup a connection like that myself and is easy to do.


step 1:

Have an entry in your pap/chap secret file with
empty username and password.

e.g:
--------------------------------

    ""      *       ""       *

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



step 2:

Apply this patch.
(Just comment out the 2 lines which forces a username on you)


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

--- ppp-2.4.2-FINAL/pppd/auth.c     Tue Feb  1 10:57:00 2005
+++ ppp-2.4.2/pppd/auth.c       Mon Feb  7 09:30:44 2005
@@ -1109,8 +1109,6 @@
     /* Default our_name to hostname, and user to our_name */
     if (our_name[0] = 0 || usehostname)
        strlcpy(our_name, hostname, sizeof(our_name));
-    if (user[0] = 0)
-       strlcpy(user, our_name, sizeof(user));

     /*
      * If we have a default route, require the peer to authenticate

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


That should work...
(Well it did for me any case)



Pieter








> G'Day,
> 
> 	I am trying to use a GSM modem to create a GPRS connection via pppd.  I
> have managed to work most things out, but am finding authentication a
> stumbling block: I need to send a blank name and password, but pppd is
> sending my local name (which is obviously being treated as incorrect by
> the server).  Looking through the pppd code, I came across null_login(),
> which looks like it may provide what I need, but I cannot seem to get
> pppd to call it --- obviously I am misunderstanding something along the
> way, and have something set up wrong.
> 
> 	Could someone please tell me how to configure pppd to reply to a PAP
> request with a blank name and password?  I'll include dumps of my pppd
> and chat scripts below, in case they are relevant.
> 
> 	-- Matthew
> 
> /etc/ppp/peers/gprs-script:
> 115200
> noauth
> debug
> crtscts
> noipdefault
> modem
> usepeerdns
> defaultroute
> pap-max-authreq 3
> connect-delay 10000
> connect '/usr/sbin/chat -v -f /etc/ppp/gprs-init'
> 
> /etc/ppp/gprs-init:
> TIMEOUT 10
> ABORT "NO CARRIER"
> ABORT "NO DIALTONE"
> ABORT "BUSY"
> ABORT "ERROR"
> "" AT+WOPEN=1 OK
> \dAT+CPIN? TIMEOUT 5 READY-\dAT+CPINU69-OK
> \dAT+CPIN? TIMEOUT 10 READY
> \dAT+CREG=1 OK
> \dAT+CGDCONT=1,"IP","telstra.internet" OK
> \dAT+CGDATA=1 ""
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2006-02-02  6:38 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-01  5:06 Hot to perform a null login? Matthew Percival
2006-02-01  5:16 ` Bill Unruh
2006-02-01  5:34 ` Matthew Percival
2006-02-01  6:00 ` Bill Unruh
2006-02-01  6:12 ` James Cameron
2006-02-01 11:40 ` James Carlson
2006-02-01 11:45 ` James Cameron
2006-02-01 22:09 ` Matthew Percival
2006-02-01 22:26 ` Bill Unruh
2006-02-01 22:29 ` Bill Unruh
2006-02-01 22:40 ` James Carlson
2006-02-01 23:03 ` Matthew Percival
2006-02-01 23:03 ` James Cameron
2006-02-01 23:13 ` James Cameron
2006-02-02  3:33 ` Matthew Percival
2006-02-02  6:38 ` Pieter Loubser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).