Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ppp connection and terminal-based authentication
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Tin
Guru
Guru


Joined: 22 Dec 2005
Posts: 305
Location: Namur, Belgium

PostPosted: Wed Mar 18, 2009 6:20 pm    Post subject: ppp connection and terminal-based authentication Reply with quote

Hello, I have a very simple question.

I am using kppp to connect to a customer network, with the option "Terminal-based authentication"
It means that the modem rings, blahblahblah with the other side, then ask me the username and password.

I would like to find a command line app which do the same thing.

I tried wvdial but it is not possible to have the same behaviour (interactive username and password), which is important because the customer is generating me by phone a password which lifetime is less than one minute.

Have you ever heard about such application ?
_________________
Tin, the gentoobie
Back to top
View user's profile Send private message
mrness
Retired Dev
Retired Dev


Joined: 17 Feb 2004
Posts: 375
Location: bucharest.ro

PostPosted: Sat Mar 28, 2009 10:22 am    Post subject: Reply with quote

wvdial should auto-detect when terminal authentication is needed.

Also, you can do it in the pppd connect script which normally is a chat script (see man chat and search for chat_ppp0 in /etc/conf.d/net.example to see how these scripts looks like):
Code:

...
'ogin:'  'your_login_name'
'assword:' 'your_password'
'TIMEOUT' '5'
'~--' ''
Back to top
View user's profile Send private message
Tin
Guru
Guru


Joined: 22 Dec 2005
Posts: 305
Location: Namur, Belgium

PostPosted: Mon Mar 30, 2009 5:20 pm    Post subject: Reply with quote

Thank you mrness, but it is not yet what I need ;-)

Code:

# PPP requires at least a username. You can optionally set a password here too
# If you don't, then it will use the password specified in /etc/ppp/*-secrets
# against the specified username
#username_ppp0='user'
#password_ppp0='password'
# NOTE: You can set a blank password like so
#password_ppp0=


and I don't want the username and password to be provided !
I want to type them myself when prompted
because the password is generated for a short time
(if I ask for a password, then launch immediately the wvdial with correct username and password, the time the modem takes to dial the number and negociate, then the prompt arrives but at that moment, the password is not valid anymore...)

I made a change request to wvdial to be able to specify in the configuration file that any parameter should be read from standard input : https://bugs.gentoo.org/show_bug.cgi?id=264315

Thanks anyway for your help :-)
_________________
Tin, the gentoobie
Back to top
View user's profile Send private message
mrness
Retired Dev
Retired Dev


Joined: 17 Feb 2004
Posts: 375
Location: bucharest.ro

PostPosted: Mon Mar 30, 2009 5:56 pm    Post subject: Reply with quote

Tin wrote:
(if I ask for a password, then launch immediately the wvdial with correct username and password, the time the modem takes to dial the number and negociate, then the prompt arrives but at that moment, the password is not valid anymore...)


That's a very short lived password... pppd has a plugin that prompts user for password, unfortunately it will use it only for standard PPP authentication.
Back to top
View user's profile Send private message
Tin
Guru
Guru


Joined: 22 Dec 2005
Posts: 305
Location: Namur, Belgium

PostPosted: Mon Mar 30, 2009 6:19 pm    Post subject: Reply with quote

mrness wrote:
Tin wrote:
(if I ask for a password, then launch immediately the wvdial with correct username and password, the time the modem takes to dial the number and negociate, then the prompt arrives but at that moment, the password is not valid anymore...)


That's a very short lived password... pppd has a plugin that prompts user for password, unfortunately it will use it only for standard PPP authentication.

Indeed, generated password are less than one minute (and best of all, when the customer gives me the password, perhaps already 40 seconds were gone since the beginning of its validity)

In these moments, you really feel that this modem is DAMN slow to detect the carrier, ringing the long international number, the other computer let 3 or 4 or 7 rings before answering, then both modems are singing their little performance, then you see stuff like "ppp registration, authentication needed, username :" you type as quick as you can the username, enter, then hanging of three seconds, then prompt for the password, and OF COURSE your password is expired :-D

I succeeded with another way :
use kermit to directly connect on the /dev/ttySx (serial line of the modem), then type yourself the ATDT commands to open the line, play yourself the phone number (very funny) and see all that stuff, then of course enter yourself the username and password.
It works and it is actually very funny, especially when you have some windows users looking at you at that time like if you were an extraterrestrial (oh ? we are ? Oo), but it is not easy to use in scripts or with shortcuts and after doing that tens times a day, it becomes quickly tiedous...

Actually, I am not in a hurry because kppp is doing it like a charm for the moment.

I just prefer to do something like :
wvdial Phone=00322523478 Username=test Password=STDIN
for each different connection (and create aliases for them which add one route only to the machine I have to reach and not use the new ip as default gateway)

instead of having to populate through the gui of kppp one complete configuration for each different connection.

(one other reason is that I am under kde3.5 for the moment and I am not sure at all that kppp is ok on kde4, but this is another discussion)
_________________
Tin, the gentoobie
Back to top
View user's profile Send private message
mrness
Retired Dev
Retired Dev


Joined: 17 Feb 2004
Posts: 375
Location: bucharest.ro

PostPosted: Mon Mar 30, 2009 7:05 pm    Post subject: Reply with quote

If you get the password before you actually start dialing, I don't see how prompting for a password will speed things up. You can make your own script which does the following:
Code:

export USERNAME=$1
export PASSWORD=$2
pppd ... connect "chat -f path-to-chat-script" ...

The chat script will have to look like this:
Code:

...
'ogin:'  '$USERNAME'
'assword:' '$PASSWORD'
'TIMEOUT' '5'
'~--' ''
Back to top
View user's profile Send private message
Tin
Guru
Guru


Joined: 22 Dec 2005
Posts: 305
Location: Namur, Belgium

PostPosted: Tue Mar 31, 2009 7:18 am    Post subject: Reply with quote

mrness wrote:
If you get the password before you actually start dialing, I don't see how prompting for a password will speed things up.


Sorry, I messed up in my explanation :

I call the customer.
I launch the modem dialing.
With the customer on the phone, we wait for the modem to finish ringing.
When I get the password prompt, I ask the customer for the password.
He taps his calculator and spells me the generated 6 digits password.
I type the password and I am authenticated on their vpn.

Simpler to understand like this ? ;-)
_________________
Tin, the gentoobie
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum