Skip to contentSkip to conversation

Hot to perform a null login?

DISCUSSION Matthew Percival 5 participants 16 messages Feb 1, 2006 – Feb 2, 2006 PPP protocol drivers and compressors

lore
Share & tools
lore
#0 lore raw

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 ""

#1 lore raw
Quoted 11 lines · Matthew Percival

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.

Quoted 3 lines

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.

Quoted 16 lines

-- 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'

Quoted 13 lines

/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.

Quoted 5 lines

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

Signature · 4 lines
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 |     [email protected]
Canada V6T 1Z1     |      and Gravity       |  www.theory.physics.ubc.ca/
#2 lore raw
In reply to Matthew Percival

G'Day,

Quoted 3 lines

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.

Quoted 6 lines

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

#3 lore raw
In reply to Matthew Percival
Quoted 9 lines · Matthew Percival

G'Day,

Quoted 3 lines

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.

Quoted 8 lines
Quoted 7 lines

You might have a line

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

Quoted 4 lines

I just tried that, but it still defaulted to my local name.

Quoted 1 line

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.

#4 lore raw
In reply to Matthew Percival

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.

Signature · 2 lines
James Cameron
http://ftp.hp.com.au/sigs/jc/
#5 lore raw
In reply to Matthew Percival
Quoted 3 lines · James Cameron

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.

Signature · 1 line
James Carlson         42.703N 71.076W         <[email protected]>
#6 lore raw
In reply to Matthew Percival
Quoted 3 lines · James Carlson

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. ;-}

Signature · 1 line
James Cameron
#7 lore raw
In reply to Matthew Percival

G'Day,

Quoted 3 lines

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.
Quoted 3 lines

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

#8 lore raw
In reply to Matthew Percival

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.

Quoted 123 lines · Matthew Percival

G'Day,

Quoted 3 lines

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.
Quoted 3 lines

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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 4 lines
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 |     [email protected]
Canada V6T 1Z1     |      and Gravity       |  www.theory.physics.ubc.ca/
#9 lore raw
In reply to Matthew Percival

PS:

Quoted 1 line

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.

Quoted 2 lines

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.

#10 lore raw
In reply to Matthew Percival
Quoted 5 lines · Bill Unruh
Quoted 2 lines

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.

Signature · 1 line
James Carlson         42.703N 71.076W         <[email protected]>
#11 lore raw
In reply to Matthew Percival

G'Day,

Quoted 3 lines
Quoted 1 line

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.

Quoted 5 lines
Quoted 2 lines

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

#12 lore raw
In reply to Matthew Percival

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.

Signature · 2 lines
James Cameron
http://ftp.hp.com.au/sigs/jc/
#13 lore raw
In reply to Matthew Percival

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.

Signature · 2 lines
James Cameron
http://ftp.hp.com.au/sigs/jc/
#14 lore raw
In reply to Matthew Percival

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

#15 lore raw
In reply to Matthew Percival

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)

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

pppd/auth.c Mon Feb 7 09:30:44 2005 renamed from pppd/auth.c Tue Feb 1 10:57:00 2005 +0 -2
@@ -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

Quoted 47 lines

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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html