LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-30-2006, 12:33 AM   #1
saravkrish
Member
 
Registered: Mar 2004
Location: KY, USA
Distribution: Fedora Core 1
Posts: 190

Rep: Reputation: 30
How to redirect txt file to password input?


Hi,

I'm using vpnc to log on to my office.

I want to use zenity to get the password input thru a GUI textbox and then pass it on to vpnc.

vpnc < password.txt

doesn't work. How do I get this to work? Or is there someother GUI interface for VPNC in Fedora?

Thanks,
Sarav
 
Old 03-31-2006, 12:19 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
there is actually a Network-Manager module for vpnc but it's pretty unstable, and.. crap in my experience. if you want to wrap vpnc this much, then just use an expect script. as you will see from the documentation, vpnc will deliberatley not accept a password from a command line, it must be in a configuration file, or manually typed in. Expect can automate this manual entry exeternal to the program. I'd say that this was insecure as you would be holding a plaintext password in your script, but in reality it's better than a fixed config file which contains a plaintext string anyway!
 
Old 03-31-2006, 08:40 PM   #3
saravkrish
Member
 
Registered: Mar 2004
Location: KY, USA
Distribution: Fedora Core 1
Posts: 190

Original Poster
Rep: Reputation: 30
Hi,

Thanks for the reply. I will check out expect. I know it would be insecure, but I will be writing the password to a file, redirecting it and then delete it. I know it will still be accessible thru a raw read, but it's much better than a file that stays all the time.

Thanks,
Sarav
 
Old 04-01-2006, 02:23 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well if you are using expect then there is no need for an temporary file, it can directly read the "Password: " prompt that vpnc provides.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Txt extension file translation UltraSoul Solaris / OpenSolaris 3 05-21-2005 11:11 AM
How to redirect input in VC++ samirshah02 Conectiva 0 09-12-2004 10:51 PM
c++ writing to a .txt file xemous Programming 8 09-01-2004 10:57 PM
How to convert a txt file to be a db file in Redhat linux 9? winnie Linux - Newbie 3 06-27-2003 08:33 AM
How to Redirect serial port input to a file Legaviu Linux - General 1 07-31-2001 07:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration