[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Logging in w/ session-specific passwd



Quoting Julian S. Taylor (julian@webaccess.net):
> 
> I log in to Sun using a prompt-response method. The server sends down a
> random number, I make an entry into a calculator and it gives me the
> password for that session. For this reason, I can't hook up using expect
> or chat. Using slackware and Caldera, I just log in using cu. Debian's
> configuration has me totally baffled. My usual trick with cu was to log
> in, start the ppp session on the remote and then paste in the command:
> 
>     ~+/usr/sbin/pppd defaultroute ...
> 
> When I use cu on Debian I get the message"pppd permission denied". I can
> use wvdial to my ISP but I can't get into Sun now that I've switched to
> Debian. What am I doing wrong?

I dug into a few very old personal howto files and found these hints
which I've untidily extracted from the mgetty setup stuff. (I hope
there's enough here.)

Install minicom. As root, minicom -s and set up the correct serial
port, say, /dev/ttyS1 if you have a serial mouse on COM1, speed etc.
Save as dfl.

Set up chap-secrets and/or pap-secrets files.

Add userid to groups dip and dialout.

Log in as userid and prepare an axecutable file ~/ppp with (I use chap):

#! /bin/bash
/usr/sbin/pppd /dev/ttyS1 115200 defaultroute auth +chap chap-interval 60

Run minicom and type
^a d and dial the correct number

During/after the fanfare, press any letter.

		( For callback to mgetty only:
		( When the login prompt is given, type
		( magic-userid <return>
		( When the phone starts to ring, type
		( ata <return>

When the login prompt is given, type

^a q and confirm, then type
~/ppp <return>

To hang up, type poff <return>.

I guess you have to do some typing before your ^a q out of minicom,
and change ~/ppp to suit. (A file is only necessary because you can't
type all that within the few seconds available.)

I guess that as the connect option in pppd can take any shell
script, it ought to be possible to hack together a script with
two chat commands and a dialogue in between them to ask you for
the password. The first chat would 'say' the number, the second
would have your response conveyed to it either by shell substitution
into the script or through a nonce file. I'd have a go, but I've
really only got time to send this message.

Cheers,

-- 
Email:  d.wright@open.ac.uk   Tel: +44 1908 653 739  Fax: +44 1908 655 151
Snail:  David Wright, Earth Science Dept., Milton Keynes, England, MK7 6AA
Disclaimer:   These addresses are only for reaching me, and do not signify
official stationery. Views expressed here are either my own or plagiarised.


Reply to: