Cisco VPNClient hangs from command line when connecting

Hi,

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?
JimR123bAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
I checked with  5.0.00.0340, 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 ;-).

0
JimR123bAuthor Commented:
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.
 
0
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
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:
Username=myuser
SaveUserPassword=1
UserPassword=mypassword
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.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Smartphone Programming

From novice to tech pro — start learning today.