Cisco VPNClient hangs from command line when connecting

Posted on 2010-03-29
Medium Priority
Last Modified: 2012-05-09

I'm trying to use Cisco's VPN client from the command line (DOS), to connect to a remote server.

I use a command line such as:

    vpnclient connect "my connection" user myuser pwd mypassword

It all seems to work fine, except after connecting, it never returns back to the DOS prompt. The last thing it says is "Local LAN Access is disabled".

At this point, I am able to access the server, via file shares, so I know that it's connected.

But, I need it to return to the DOS prompt so that I can include it in a batch file. How can I make it do this?
Question by:JimR123b
  • 2
LVL 72

Expert Comment

ID: 30304991
I checked with, and it returns as soon as I am connected. But only if do not provide a password on commandline. That is:
vpnclient connect "my connection"
works, but
vpnclient connect "my connection" pwd x
does not.

I do not know the difference, but there is one, since the latter will output more info and wait. The former works because user and password are stored in the profile, which is write-protected to prevent any change like password removal by the VPN client on connect ;-).


Author Comment

ID: 30494001
How do I store the user and pwd on the profile?
In the Windows interface, a different username and password is shown to that which I pass in the command line. If I change the shown login to the command line one, it doesn't connect even through the Windows interface.
Usually, I double-click in the Windows interface the connection, and it then prompts for the login which I pass in the command line. That then connects me. Not sure why there's 2 logins, but it seems to require them both.
LVL 72

Accepted Solution

Qlemo earned 2000 total points
ID: 30517902
In the GUI, in "Authentication", you see a group authentication first. That is which is sent when contacting the gateway, to identify whether you have access at all.
After that first part is done, the server will ask you thru the client to provide your own credentials. Those need to be stored after connect.

To do that, you need to edit your profile file (*.pcf). Change the following lines:
Connect once. The profile file should have changed, the UserPassword is now empty, instead the enc_UserPassword value contains data. Write-protect the file (!) now. Disconnect. Now you should be able to connect without further prompts.

Warning! Whoever has access to this file can open a connection, so you should protect it! The password is not stored in plain text, but the file as a whole will work without knowing anything.

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

A short article about problems I had with the new location API and permissions in Marshmallow
Ready to kick start your career in 2018? Add app developer skills to your resume. January’s Course of the Month features Android App Development training with hands-on learning.  Read on to learn why these skills are important.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question