QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2088|回复: 2

求助 :pap认证失败

[复制链接]
发表于 2006-11-7 16:38:37 | 显示全部楼层 |阅读模式
uclinux下,ppp(2.3.8)拨号上网
猫在rh9下拨号完全正常
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
脚本ppp-on
#!/bin/sh
LOCAL_IP=0.0.0.0               
REMOTE_IP=0.0.0.0               
DSCRIPT=/etc/ppp/ppp-on-dialer

exec /bin/pppd debug lock modem  nocrtscts /dev/ttyS1 9600 \
        noipdefault  defaultroute auth -chat usepeerdns \
        user haha connect $DSCRIPT
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#options文件
debug
lock
modem
nocrtscts
-chap
auth
user haha
defaultroute
noipdefault
usepeerdns
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# pap-secrets文件
# Secrets for authentication using PAP
# client        server        secret                        IP addresses
####### redhat-config-network will overwrite this part!!! (begin) ##########
haha        *        ""        *
####### redhat-config-network will overwrite this part!!! (end) ############
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#脚本ppp-on-dialer
#!/bin/sh
exec /bin/chat -v                                                \
        ''                \rAT                                \
        OK                ATDT*99***1#                        \
        CONNECT                '\d\c'                                \
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

在我的开发版44b0上运行ppp-on 后 出现以下错误
[code:1]
<29>Jan  1 00:00:23 pppd[25]: pppd 2.3.8 started by (unknown), uid 0

<31>Jan  1 00:00:23 pppd[25]: using channel 1

<30>Jan  1 00:00:23 pppd[25]: Using interface ppp0

<29>Jan  1 00:00:23 pppd[25]: pppd create pidfile

<29>Jan  1 00:00:23 pppd[25]: Connect: ppp0 <--> /dev/ttyS1

<28>Jan  1 00:00:23 pppd[25]: Will not do CHAP for user haha

<31>Jan  1 00:00:23 pppd[25]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <auth pap>

<31>Jan  1 00:00:24 pppd[25]: rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <auth pap>

<31>Jan  1 00:00:24 pppd[25]: lcp_reqci: returning CONFNAK.

<31>Jan  1 00:00:24 pppd[25]: sent [LCP ConfNak id=0x1 <magic 0x2bf098f1>]

<31>Jan  1 00:00:24 pppd[25]: rcvd [LCP ConfNak id=0x1 <magic 0x2bf098f1>]

<31>Jan  1 00:00:24 pppd[25]: sent [LCP ConfReq id=0x2 <asyncmap 0x0> <auth pap>

<31>Jan  1 00:00:24 pppd[25]: rcvd [LCP ConfReq id=0x2 <asyncmap 0x0> <auth pap>

<31>Jan  1 00:00:24 pppd[25]: lcp_reqci: returning CONFNAK.

<31>Jan  1 00:00:24 pppd[25]: sent [LCP ConfNak id=0x2 <magic 0x469e6739>]

<31>Jan  1 00:00:24 pppd[25]: rcvd [LCP ConfNak id=0x2 <magic 0x469e6739>]

<31>Jan  1 00:00:24 pppd[25]: sent [LCP ConfReq id=0x3 <asyncmap 0x0> <auth pap>

<31>Jan  1 00:00:24 pppd[25]: rcvd [LCP ConfReq id=0x3 <asyncmap 0x0> <auth pap>

<31>Jan  1 00:00:24 pppd[25]: lcp_reqci: returning CONFNAK.

<31>Jan  1 00:00:24 pppd[25]: sent [LCP ConfNak id=0x3 <magic 0x40bfd512>]

<31>Jan  1 00:00:24 pppd[25]: rcvd [LCP ConfNak id=0x3 <magic 0x40bfd512>]

<31>Jan  1 00:00:24 pppd[25]: sent [LCP ConfReq id=0x4 <asyncmap 0x0> <auth pap

<31>Jan  1 00:00:24 pppd[25]: rcvd [LCP ConfReq id=0x4 <asyncmap 0x0> <auth pap>

<31>Jan  1 00:00:24 pppd[25]: lcp_reqci: returning CONFNAK.

<31>Jan  1 00:00:24 pppd[25]: sent [LCP ConfNak id=0x4 <magic 0x4ca696bf>]

<31>Jan  1 00:00:24 pppd[25]: rcvd [LCP ConfNak id=0x4 <magic 0x4ca696bf>]

<31>Jan  1 00:00:24 pppd[25]: sent [LCP ConfReq id=0x5 <asyncmap 0x0> <auth pap>

<31>Jan  1 00:00:24 pppd[25]: rcvd [LCP ConfReq id=0x5 <asyncmap 0x0> <auth pap>

<31>Jan  1 00:00:24 pppd[25]: lcp_reqci: returning CONFNAK.

<31>Jan  1 00:00:24 pppd[25]: sent [LCP ConfNak id=0x5 <magic 0x6beb4397>]

<31>Jan  1 00:00:24 pppd[25]: rcvd [LCP ConfNak id=0x5 <magic 0x6beb4397>]

<31>Jan  1 00:00:24 pppd[25]: sent [LCP ConfReq id=0x6 <asyncmap 0x0> <auth pap>

<31>Jan  1 00:00:24 pppd[25]: rcvd [LCP ConfReq id=0x6 <asyncmap 0x0> <auth pap>

<31>Jan  1 00:00:24 pppd[25]: lcp_reqci: returning CONFNAK.

<31>Jan  1 00:00:24 pppd[25]: sent [LCP ConfNak id=0x6 <magic 0x61c562e9>]

<31>Jan  1 00:00:24 pppd[25]: rcvd [LCP ConfNak id=0x6 <magic 0x61c562e9>]

<31>Jan  1 00:00:24 pppd[25]: sent [LCP ConfReq id=0x7 <asyncmap 0x0> <auth pap>

<31>Jan  1 00:00:24 pppd[25]: rcvd [LCP ConfReq id=0x7 <asyncmap 0x0> <auth pap>

<31>Jan  1 00:00:24 pppd[25]: lcp_reqci: returning CONFNAK.

<31>Jan  1 00:00:25 pppd[25]: sent [LCP ConfNak id=0x8 <magic 0x2850d80d>]

<31>Jan  1 00:00:25 pppd[25]: rcvd [LCP ConfNak id=0x8 <magic 0x2850d80d>]

<31>Jan  1 00:00:25 pppd[25]: sent [LCP ConfReq id=0x9 <asyncmap 0x0> <auth pap>

<31>Jan  1 00:00:25 pppd[25]: rcvd [LCP ConfReq id=0x9 <asyncmap 0x0> <auth pap>

<31>Jan  1 00:00:25 pppd[25]: lcp_reqci: returning CONFNAK.

<31>Jan  1 00:00:25 pppd[25]: sent [LCP ConfNak id=0x9 <magic 0x7702c7de>]

<31>Jan  1 00:00:25 pppd[25]: rcvd [LCP ConfNak id=0x9 <magic 0x7702c7de>]

<31>Jan  1 00:00:25 pppd[25]: sent [LCP ConfReq id=0xa <asyncmap 0x0> <auth pap>

<31>Jan  1 00:00:25 pppd[25]: rcvd [LCP ConfReq id=0xa <asyncmap 0x0> <auth pap>

<31>Jan  1 00:00:25 pppd[25]: lcp_reqci: returning CONFNAK.

<31>Jan  1 00:00:25 pppd[25]: sent [LCP ConfNak id=0xa <magic 0x75d42367>]

<31>Jan  1 00:00:25 pppd[25]: rcvd [LCP ConfNak id=0xa <magic 0x75d42367>]

<29>Jan  1 00:00:25 pppd[25]: Serial line is looped back.

<31>Jan  1 00:00:25 pppd[25]: sent [LCP TermReq id=0xb "Loopback detected"]

<31>Jan  1 00:00:25 pppd[25]: rcvd [LCP TermReq id=0xb "Loopback detected"]

<31>Jan  1 00:00:25 pppd[25]: sent [LCP TermAck id=0xb]

<31>Jan  1 00:00:25 pppd[25]: rcvd [LCP TermAck id=0xb]

<29>Jan  1 00:00:25 pppd[25]: Connection terminated.

<30>Jan  1 00:00:26 pppd[25]: Exit.

[/code:1]

按错误信息来看,应该是在options选项中少 user username 或者 在pap-secrets文件中没有 username * "" * ,但是,在我的脚本中,这些情况都不存在,请教大侠们,有谁可以给我提出个好的解决方案。
 楼主| 发表于 2006-11-10 15:26:55 | 显示全部楼层
难道这个问题简单得让人不屑一顾么?
回复

使用道具 举报

 楼主| 发表于 2006-11-10 15:36:04 | 显示全部楼层
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# ppp-on
#!/bin/sh
TELEPHONE=*99***1#       
ACCOUNT=               
PASSWORD=               
LOCAL_IP=0.0.0.0       
REMOTE_IP=0.0.0.0       
NETMASK=255.255.255.0       

DIALER_SCRIPT=/etc/ppp/ppp-on-dialer

exec /usr/sbin/pppd debug lock modem nocrtscts /dev/ttyS0 9600 \
        asyncmap 20A0000 escape FF kdebug 0 $LOCAL_IP:$REMOTE_IP \
        noipdefault netmask $NETMASK defaultroute connect $DIALER_SCRIPT
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#options
/dev/ttyS0
9600
nocrtscts
modem
auth
-chap
noipdefault
defaultroute
user john_doe
usepeerdns
lock
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#pap-secrets
# Secrets for authentication using PAP
# client        server        secret                        IP addresses
john_doe * "" *
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#chap-secrets
# Secrets for authentication using PAP
# client        server        secret                        IP addresses
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#ppp-on-dialer
#!/bin/sh
#
exec chat -v                                                \
        TIMEOUT                3                                \
        ABORT                '\nBUSY\r'                        \
        ABORT                '\nNO ANSWER\r'                        \
        ABORT                '\nRINGING\r\n\r\nRINGING\r'        \
        ''                \rAT                                \
        'OK-+++\c-OK'        ATH0                                \
        TIMEOUT                30                                \
        OK                ATDT*99***1#                        \
        CONNECT                ''                                \
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
这个脚本也是正确的,在linux下可以拨上去
但是在uclinux下,却出现和上述脚本一样的错误
可见,不是脚本的错误

但是,如果还有其他影响pppd拨号的因素,还望有经验的朋友给个提醒
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-22 11:49 , Processed in 0.043861 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表