PC Review


Reply
Thread Tools Rate Thread

Connect to VPN from command line?

 
 
Samuel R. Neff
Guest
Posts: n/a
 
      27th Mar 2007
How can I establish a VPN connection using saved credentials via the
command line?

Searches on the web point to rasdial but I'm having trouble using the
credentials stored with the connections. If I point rasdial to the
"all users" phone book I get this error:

Remote Access error 691 - Access was denied because the username
and/or password was invalid on the domain.

and if I point it to my personal phonebook I get this error:

Remote Access error 623 - The system could not find the phone book
entry for this connection.

Iif I create a .lnk shortcut to the connection, I can launch it
through windows explorer only--if I launch it through the command line
doesn't seem to do anything--no error, but doesn't connect to the vpn.

Please help.

Thanks,

Sam


------------------------------------------------------------
We're hiring! B-Line Medical is seeking .NET
Developers for exciting positions in medical product
development in MD/DC. Work with a variety of technologies
in a relaxed team environment. See ads on Dice.com.
 
Reply With Quote
 
 
 
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      27th Mar 2007

"Samuel R. Neff" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> How can I establish a VPN connection using saved credentials via the
> command line?
>
> Searches on the web point to rasdial but I'm having trouble using the
> credentials stored with the connections. If I point rasdial to the
> "all users" phone book I get this error:
>
> Remote Access error 691 - Access was denied because the username
> and/or password was invalid on the domain.
>
> and if I point it to my personal phonebook I get this error:
>
> Remote Access error 623 - The system could not find the phone book
> entry for this connection.
>
> Iif I create a .lnk shortcut to the connection, I can launch it
> through windows explorer only--if I launch it through the command line
> doesn't seem to do anything--no error, but doesn't connect to the vpn.
>
> Please help.
>
> Thanks,
>
> Sam


The usual way is to type rasdial.exe /? at the Command Prompt.
It gives you these instructions:
=====================
USAGE:
rasdial entryname [username [password|*]] [/DOMAIN:domain]
[/PHONEhonenumber] [/CALLBACK:callbacknumber]
[/PHONEBOOKhonebookfile] [/PREFIXSUFFIX]

rasdial [entryname] /DISCONNECT
=====================
Hence a command such as this one would work nicely:

rasdial SamVPN Sam SomePassword /phonebook:c:\rasphone.pbk

There is, of course, a big security risk in placing a password into a
script file.


 
Reply With Quote
 
Samuel R. Neff
Guest
Posts: n/a
 
      27th Mar 2007

Yes, as I said in the original message, I want to use the saved
credentials as if I'd launched the link directly. I don't want to
copy credentials to the batch file.

Please help.

Thanks,

Sam


On Tue, 27 Mar 2007 12:07:59 +1000, "Pegasus \(MVP\)" <(E-Mail Removed)>
wrote:

>The usual way is to type rasdial.exe /? at the Command Prompt.
>It gives you these instructions:
>=====================
>USAGE:
> rasdial entryname [username [password|*]] [/DOMAIN:domain]
> [/PHONEhonenumber] [/CALLBACK:callbacknumber]
> [/PHONEBOOKhonebookfile] [/PREFIXSUFFIX]
>
> rasdial [entryname] /DISCONNECT
>=====================
>Hence a command such as this one would work nicely:
>
>rasdial SamVPN Sam SomePassword /phonebook:c:\rasphone.pbk
>
>There is, of course, a big security risk in placing a password into a
>script file.
>


------------------------------------------------------------
We're hiring! B-Line Medical is seeking .NET
Developers for exciting positions in medical product
development in MD/DC. Work with a variety of technologies
in a relaxed team environment. See ads on Dice.com.
 
Reply With Quote
 
Samuel R. Neff
Guest
Posts: n/a
 
      2nd Apr 2007

How can we launch a VPN connection via the command line without
embedding the username and password in the command line, i.e., using
the saved credentials just as if you'd launched the connection through
Network Connections?

With Rasdial when specifying the all-users phonebook I get this error:

Remote Access error 691 - Access was denied because the username
and/or password was invalid on the domain.

and if I point it to my personal phonebook I get this error:

Remote Access error 623 - The system could not find the phone book
entry for this connection.

Iif I create a .lnk shortcut to the connection, I can launch it
through windows explorer only--if I launch it through the command line
doesn't seem to do anything--no error, but doesn't connect to the vpn.

Please help.

Thanks,

Sam
------------------------------------------------------------
We're hiring! B-Line Medical is seeking .NET
Developers for exciting positions in medical product
development in MD/DC. Work with a variety of technologies
in a relaxed team environment. See ads on Dice.com.
 
Reply With Quote
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      2nd Apr 2007

"Samuel R. Neff" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> How can we launch a VPN connection via the command line without
> embedding the username and password in the command line, i.e., using
> the saved credentials just as if you'd launched the connection through
> Network Connections?
>
> With Rasdial when specifying the all-users phonebook I get this error:
>
> Remote Access error 691 - Access was denied because the username
> and/or password was invalid on the domain.
>
> and if I point it to my personal phonebook I get this error:
>
> Remote Access error 623 - The system could not find the phone book
> entry for this connection.
>


You must first create the connection from the interactive
facility within Control Panel / Network Connections.
After you do, have a look in the phone book. It's a text
file and you can open it with any text editor. Be a little
inquisitive!


 
Reply With Quote
 
Samuel R. Neff
Guest
Posts: n/a
 
      2nd Apr 2007

Yes, the phone book is an INI file with lots of info about the
connection. The username and passwrod are not there and I don't see
how knowing what is in the pbk file helps with the original problem..
how do I actually dial the vpn connection without putting username and
password in the command line?

As I said I can run rasdial and get different error messages depending
on whether I specify the "all" vs "personal" phonebook (the connection
info is in the all phonebook) but I can't get it to connect without
specifying username and password in the command line (even though it
is stored with the connection--although obviously not in the pbk
file).

Thanks,

Sam


On Mon, 2 Apr 2007 13:04:50 +1000, "Pegasus \(MVP\)" <(E-Mail Removed)>
wrote:

>
>You must first create the connection from the interactive
>facility within Control Panel / Network Connections.
>After you do, have a look in the phone book. It's a text
>file and you can open it with any text editor. Be a little
>inquisitive!
>


------------------------------------------------------------
We're hiring! B-Line Medical is seeking .NET
Developers for exciting positions in medical product
development in MD/DC. Work with a variety of technologies
in a relaxed team environment. See ads on Dice.com.
 
Reply With Quote
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      2nd Apr 2007
Here is what I quoted in my first reply for the rasdial syntax:

USAGE:
rasdial entryname [username [password|*]] [/DOMAIN:domain]
[/PHONEhonenumber] [/CALLBACK:callbacknumber]
[/PHONEBOOKhonebookfile] [/PREFIXSUFFIX]

rasdial [entryname] /DISCONNECT

Unless I'm seeing things, it has both the user name and the password
as a parameter. The phonebook is there too!


"Samuel R. Neff" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> Yes, the phone book is an INI file with lots of info about the
> connection. The username and passwrod are not there and I don't see
> how knowing what is in the pbk file helps with the original problem..
> how do I actually dial the vpn connection without putting username and
> password in the command line?
>
> As I said I can run rasdial and get different error messages depending
> on whether I specify the "all" vs "personal" phonebook (the connection
> info is in the all phonebook) but I can't get it to connect without
> specifying username and password in the command line (even though it
> is stored with the connection--although obviously not in the pbk
> file).
>
> Thanks,
>
> Sam
>
>
> On Mon, 2 Apr 2007 13:04:50 +1000, "Pegasus \(MVP\)" <(E-Mail Removed)>
> wrote:
>
> >
> >You must first create the connection from the interactive
> >facility within Control Panel / Network Connections.
> >After you do, have a look in the phone book. It's a text
> >file and you can open it with any text editor. Be a little
> >inquisitive!
> >

>
> ------------------------------------------------------------
> We're hiring! B-Line Medical is seeking .NET
> Developers for exciting positions in medical product
> development in MD/DC. Work with a variety of technologies
> in a relaxed team environment. See ads on Dice.com.



 
Reply With Quote
 
Samuel R. Neff
Guest
Posts: n/a
 
      2nd Apr 2007


Yes, and again from my original question, how can I make the call
WITHOUT embedding username and password in the command line?

Windows Explorer can launch a network connection using saved
credentials.. I want to do the same thing from a command line.

Thanks for trying to help, I'm sorry that we have such a disconnect in
my question and your answers.

Sam


On Mon, 2 Apr 2007 23:16:47 +1000, "Pegasus \(MVP\)" <(E-Mail Removed)>
wrote:

>Here is what I quoted in my first reply for the rasdial syntax:
>
>USAGE:
> rasdial entryname [username [password|*]] [/DOMAIN:domain]
> [/PHONEhonenumber] [/CALLBACK:callbacknumber]
> [/PHONEBOOKhonebookfile] [/PREFIXSUFFIX]
>
> rasdial [entryname] /DISCONNECT
>
>Unless I'm seeing things, it has both the user name and the password
>as a parameter. The phonebook is there too!
>
>
>"Samuel R. Neff" <(E-Mail Removed)> wrote in message
>news:(E-Mail Removed)...
>>
>> Yes, the phone book is an INI file with lots of info about the
>> connection. The username and passwrod are not there and I don't see
>> how knowing what is in the pbk file helps with the original problem..
>> how do I actually dial the vpn connection without putting username and
>> password in the command line?
>>
>> As I said I can run rasdial and get different error messages depending
>> on whether I specify the "all" vs "personal" phonebook (the connection
>> info is in the all phonebook) but I can't get it to connect without
>> specifying username and password in the command line (even though it
>> is stored with the connection--although obviously not in the pbk
>> file).
>>
>> Thanks,
>>
>> Sam
>>

------------------------------------------------------------
We're hiring! B-Line Medical is seeking .NET
Developers for exciting positions in medical product
development in MD/DC. Work with a variety of technologies
in a relaxed team environment. See ads on Dice.com.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using MS DOS command line how to connect MSACCESS database? kotireddy Microsoft Access External Data 1 23rd Mar 2004 09:21 PM
connect to printer using command line Jasper Recto Microsoft Windows 2000 Networking 1 5th Feb 2004 07:51 PM
Using Command Line to COMPLETELY connect with DUN ewenste Windows XP Customization 4 6th Sep 2003 02:48 AM
Connect to a shared drive from command line Bob Microsoft Windows 2000 CMD Promt 2 23rd Jul 2003 02:32 PM
Re: command-line way to modify TCP/IP settings for virt adapter added by VPN connect Johan Arwidmark Microsoft Windows 2000 CMD Promt 0 30th Jun 2003 09:17 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:04 PM.