Elya Guyer wrote:
> 
> Hello!
>    I'm looking for console based ppp dialer capable to do interactive
> login.

For example: 

In /etc/ppp/peers/gsm:
 
        ttyS1 38400 crtscts
        lock
        connect '/usr/sbin/chat -v -f /etc/ppp/dial-gsm'
        debug
        defaultroute
        name <your user name>

In /etc/ppp/dial-gsm:

        ABORT "NO CARRIER"
        ABORT "NO DIALTONE"
        ABORT "ERROR"
        ABORT "NO ANSWER"
        ABORT "BUSY"
        ABORT "Username/Password Incorrect"
        "" "ATZ"   
        OK "atdt9026481443"
        "n:" <your user name>
        "d:" <your password>

In /etc/ppp/chap-secrets or /etc/ppp/pap-secrets

        <your user name>        <their host name>       <secret>        *


You call it with "pppd call gsm" as root. If you don't want to do it
as root, look at sudo. Don't forget to set /etc/resolv.conf to the 
appropriate name server IPs.

If you wanted to supply user name password and phone number, 

In /etc/ppp/peers/gsm.skel:

        ttyS1 38400 crtscts
        lock
        connect '/usr/sbin/chat -v -f /etc/ppp/dial-gsm'
        debug
        defaultroute  

in etc/ppp/ put a file dial-gsm.skel:

        ABORT "NO CARRIER"
        ABORT "NO DIALTONE"
        ABORT "ERROR"
        ABORT "NO ANSWER"
        ABORT "BUSY"
        ABORT "Username/Password Incorrect"
        "" "ATZ"  

Then run a shell script that takes phone-number, user name and password as 
it's args:
        #
        #       Add user name as host name to peers file.
        #
        cp /etc/ppp/peers/gsm.skel cp /etc/ppp/peers/gsm
        echo "name $2" cp /etc/ppp/peers/gsm
        #
        #       Add phone number, user name and password to dial file.
        #
        #       simple example, may need to get fancy with quotes.
        #
        cp /etc/ppp/dial-gsm.skel cp 
        echo "OK ATDT$2" >/etc/ppp/dial-gsm
        echo "in $2" >/etc/ppp/dial-gsm
        echo "word $3" >/etc/ppp/dial-gsm
        #
        #       make up chap secrets (clobbers old file)
        #
        echo "$2 gsm $3 *" >/etc/ppp/chap-secrets
        #
        #       Dial out.
        # 
        /usr/sbin/pppd call gsm

If you want to dial and log in "on the fly" then dial out using cu.
When you start the other side's ppp, then type "~+/usr/sbin/pppd <ppp args>"

Geoff.
--      
Geoffrey S. Mendelson
Tel:  (03) 6944-211  Fax: (03) 6944-225 Email: [EMAIL PROTECTED] 


=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to