login with multiple prompts - PPP

This is a discussion on login with multiple prompts - PPP ; I am facing a problem from my ISP ( www.sancharnet.in ). They sent different login prompts ( login: , Username etc every time I dial up. How do you deal with this from Chat ? ( ': user' is little ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: login with multiple prompts

  1. login with multiple prompts

    I am facing a problem from my ISP ( www.sancharnet.in ). They sent
    different login prompts ( login: , Username etc every time I dial up.
    How do you deal with this from Chat ? ( ': user' is little trucky I guess)

    Also is it possible to change the timeout values inside the chat script ?
    Like 10 sec. for first operation, 60 seconds for second operation etc. ?

    Thanks,
    George

  2. Re: login with multiple prompts

    geoerge wrote:
    > I am facing a problem from my ISP ( www.sancharnet.in ). They sent
    > different login prompts ( login: , Username etc every time I dial up.
    > How do you deal with this from Chat ? ( ': user' is little trucky I guess)


    This is a variation of an example from man chat:

    ogin:-BREAK-name: ppp ssword: hello2u2

    It should be good except for etc, except you would want to set the
    chat time to a low value (5 seconds?) just before login: or Username:
    is expected. Simply using ":" as the expect in the expect/send might
    also work.

    > Also is it possible to change the timeout values inside the chat script ?
    > Like 10 sec. for first operation, 60 seconds for second operation etc. ?


    Yes. Read man chat.

    -- Clifford Kite Email: "echo xvgr_yvahk-ccc@ri1.arg|rot13"
    PPP-Q&A links, downloads: http://ckite.no-ip.net/
    /* "PPPoE has many advantages for DSL service providers, and
    practically none for DSL consumers."
    - David F. Skoll */

  3. Re: login with multiple prompts

    Clifford Kite writes:
    > This is a variation of an example from man chat:
    >
    > ogin:-BREAK-name: ppp ssword: hello2u2


    You might not want to send BREAK there. Try "-\c-" instead.

    In any event, there's nothing magical about the "chat" program. Any
    program that can use standard I/O can function as a "connect" script
    for pppd. For complicated things, something more powerful, such as
    Perl, might be a good choice.

    --
    James Carlson, IP Systems Group
    Sun Microsystems / 1 Network Drive 71.234W Vox +1 781 442 2084
    MS UBUR02-212 / Burlington MA 01803-2757 42.497N Fax +1 781 442 1677

  4. Re: login with multiple prompts

    georgevarughese@indiatimes.com (geoerge) writes:

    ]I am facing a problem from my ISP ( www.sancharnet.in ). They sent
    ]different login prompts ( login: , Username etc every time I dial up.
    ]How do you deal with this from Chat ? ( ': user' is little trucky I guess)

    The probability is reasonable that you should not log in anyway. You should
    use waht mgetty calls AutoPPP. It, right after the CONNECT message you
    should start ppp negotiations.

    See www.theory.physics.ubc.ca/ppp-linux.html


    ]Also is it possible to change the timeout values inside the chat script ?
    ]Like 10 sec. for first operation, 60 seconds for second operation etc. ?

    sure. Just put the TIMEOUT
    expect response pair anywhere you want.
    It will apply until another one changes it.

    TIMEOUT 300
    '' AT
    TIMEOUT 1
    OK ATDT5551234
    TIMEOUT 37
    CONNECT '\d\c'


    ]Thanks,
    ]George


  5. Re: login with multiple prompts

    James Carlson wrote in message news:...
    > Clifford Kite writes:
    > > This is a variation of an example from man chat:
    > >
    > > ogin:-BREAK-name: ppp ssword: hello2u2

    >
    > You might not want to send BREAK there. Try "-\c-" instead.
    >
    > In any event, there's nothing magical about the "chat" program. Any
    > program that can use standard I/O can function as a "connect" script
    > for pppd. For complicated things, something more powerful, such as
    > Perl, might be a good choice.


    My understanding is that login:-\c-name: works as follows:
    If timeout occurs wating for login:, then a \c is sent and waiting
    starts for name:
    Question is that if the string I get after the \c is login: won't
    I miss the chance to login. ( Sad thing about this part of the world
    is that the local calls are not free, unlike in US etc.) My isp has
    become very unreliable in the past one year and sometimes it takes ages
    to get any response to the chat script after the modem connects - lots of
    times with no response! Meaning the provider is making money either way :-)


    So the answer will be to use perl or so here us a regexp for the logwait.
    BTW does anybody have a perl script example for doing the chat stuff ?
    (Just a simple one will be helpful, no regexp etc. )

    May be future versions of chat should support these kind of stuff.

  6. Re: login with multiple prompts

    geoerge wrote:

    > My understanding is that login:-\c-name: works as follows:
    > If timeout occurs wating for login:, then a \c is sent and waiting
    > starts for name:
    > Question is that if the string I get after the \c is login: won't
    > I miss the chance to login. ( Sad thing about this part of the world
    > is that the local calls are not free, unlike in US etc.) My isp has
    > become very unreliable in the past one year and sometimes it takes ages
    > to get any response to the chat script after the modem connects - lots of
    > times with no response! Meaning the provider is making money either way :-)


    Unless you are *sure* the ISP requires login/password authentication
    you could try configuring for PAP/CHAP authentication and see whether
    that works. Check Bill Unruh's site for how to configure pppd to use
    PAP/CHAP.

    A mix of hosts that are able to do both login/password and PAP or CHAP
    authentication with hosts that can only do PAP or CHAP authentication
    could explain the times there is no response (prompt) at all. If only
    login/password is allowed then the ISP is likely just plain greedy.

    --
    Clifford Kite Email: "echo xvgr_yvahk-ccc@ri1.arg|rot13"
    PPP-Q&A links, downloads: http://ckite.no-ip.net/

  7. Re: login with multiple prompts

    georgevarughese@indiatimes.com (geoerge) writes:

    ]James Carlson wrote in message news:...
    ]> Clifford Kite writes:
    ]> > This is a variation of an example from man chat:
    ]> >
    ]> > ogin:-BREAK-name: ppp ssword: hello2u2
    ]>
    ]> You might not want to send BREAK there. Try "-\c-" instead.
    ]>
    ]> In any event, there's nothing magical about the "chat" program. Any
    ]> program that can use standard I/O can function as a "connect" script
    ]> for pppd. For complicated things, something more powerful, such as
    ]> Perl, might be a good choice.

    ]My understanding is that login:-\c-name: works as follows:
    ] If timeout occurs wating for login:, then a \c is sent and waiting
    ]starts for name:
    ]Question is that if the string I get after the \c is login: won't

    Yes, it will not recognize ogin:

    However again, are you sure that your ISP demands such a scripted login.
    From the looks of it-- their not being consistant across their servers,
    etc, I doubt very very much that your ISP wants you to log in.

    Try ending your script with
    CONNECT '\d\c'

    Ie, no login, no nothing after CONNECT and see if that works. This is
    called AutoPPP and almost all ISPs are set up this way. They may allow
    login, but this is far better.


    ]I miss the chance to login. ( Sad thing about this part of the world
    ]is that the local calls are not free, unlike in US etc.) My isp has
    ]become very unreliable in the past one year and sometimes it takes ages
    ]to get any response to the chat script after the modem connects - lots of
    ]times with no response! Meaning the provider is making money either way :-)

    Again this sounds like a provider who primarily provides AutoPPP and not
    login. Try it. Really-- most ISPs do NOT use a login script. This would force
    Windows users as well to use a script and ISPs do not trust Windows users
    to get it right, and do not want to be deluged with phone calls. You are
    like someone asking whether a pontoon or a rope bridge across a river is best,
    ignoring the steel bridge already built just downriver.




    ]So the answer will be to use perl or so here us a regexp for the logwait.
    ]BTW does anybody have a perl script example for doing the chat stuff ?
    ](Just a simple one will be helpful, no regexp etc. )

    ]May be future versions of chat should support these kind of stuff.


+ Reply to Thread