LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-10-2007, 04:43 AM   #1
shan_nathan
Member
 
Registered: Jun 2007
Location: India
Distribution: Redhat
Posts: 137

Rep: Reputation: 15
Encrypt passwprd in expect


Dear all,
Rignt now i am using expect for automated works. The script contains some important passwords in plain text . Can some one tell me how to encrypt them and use.

Shan
 
Old 12-10-2007, 09:00 PM   #2
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
Not really. This is a fundamental problem of automation... if you want your processes to run without interaction, your program must store enough information to authenticate itself. You can try to obfuscate stored passwords although this is usually pretty futile in th case of scripting languages. It will only deter the most clueless attacker.

You could use strong encryption to scramble the stored passwords (perhaps in a separate file from the script, which will be de-crypted only into memory at run time). However, this is flawed if you want a truly automated program because you must provide the password to de-crypt the password file... This might result in a reduction of password entry, but cannot eliminate it.

It is also not as secure as you might think... pages of memory containing the plaintext passwords might be snoopable directly by the root user, who can simply dump memory pages. Perhaps worse memory might be paged to disk, and there your plaintext passwords could stay for a long time. It is often hard to securely delete this sortr of data from disk.

It's not an easy problem to solve. If you find a solution, I would like to know about it!
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
encrypt and decrypt using encrypt(char block[64], int edflag) rockwell_001 Linux - Security 3 08-30-2009 09:16 AM
how can encrypt a filesystem jabka Linux - General 1 10-25-2006 07:26 PM
Encrypt Your Filesystem ? esckey2004 Linux - Security 2 01-04-2006 11:32 AM
adduser no encrypt andy7t Linux - Software 6 07-26-2005 10:06 AM
Encrypt vivekind Linux - General 1 01-16-2002 03:23 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:11 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