Password encryption/decryption in flat-text files


 
Thread Tools Search this Thread
Top Forums Programming Password encryption/decryption in flat-text files
# 1  
Old 03-02-2005
Password encryption/decryption in flat-text files

Dear all,
If anyone has some ideas for me how to tackle the following situation:
Imagine a type of client-server application. The client application is started by a human operator with all the necessary LDAP/Kerberos in place. The server application is started automatically as a daemon process. This server application talks to an Oracle database for which it needs a connection string, username and password as a minimum.
This information is stored in a flat-text file on the system, but everything is readable : eg. EXAMPLE_DB:usernameSmilieass

Now, I know we must consider all the security all ready in place (firewalls, unix accounts with passwords, files made read-only), but ... is there some way to make the password in the flat-text file unreadable aka. encrypted and have it decrypted when needed ? The problem is that the password, when encrypted, must first be decrypted before it becomes usable to logon to the database.

Quite a lot eh?

Dominik
# 2  
Old 03-03-2005
I think your security model has a big problem.

Yes, you could use DES-3 to encrypt a user/name password, or some other public key encryption scheme, but the user would have to enter the private key. Which means they have to in effect enter a password. Since they have to enter something:

Why not just let Oracle authenticate each user, like it would normally do? Just ask let Oracle ask the user for the credentials or you ask them and pass them to Oracle -

why do you have to have an intervening layer?
# 3  
Old 03-04-2005
Hi ,
You can use the crypt command in unix to do this.

ex.

Create a file which has the clear passwd (/tmp/testpw)
encrypt

crypt Key<clear_passwd.file > encrypt_file

crypt 123 < /tmp/testpw > /tmp/testcr

Now you can remove the clear passwd file .. But you should remeber the key.

You can connect to the oracle in the following way.

sqlplus "user_name/`crypt 123 < /tmp/testcr`"

SQL*Plus: Release 9.2.0.5.0 - Production on Fri Mar 4 08:32:25 2005

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.


Connected to:
Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.5.0 - Production

SQL>


Please check is this helps you.

Thanks and Regards

Bala
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Gpg (GnuPG) encryption and decryption

Hi Friends, There are some 7 years script in out linux server. I am trying to understand them since Linux Server changed(A). Below line in one of the encrypting script. Here scenario is encrypting bank files in our (A) server and doing Secure Copy to Server (B). GPG -v --batch --yes --armor... (1 Reply)
Discussion started by: johnsnow
1 Replies

2. UNIX for Dummies Questions & Answers

Password encryption

if I change my password on two different servers, using the same string but the encrypted password in /etc/passwd look different. If I copy an entry from one /etc/password to the other server. I can still log in to both servers using the same password. Only now both /etc/passwd entries are... (2 Replies)
Discussion started by: C0ppert0p
2 Replies

3. Shell Programming and Scripting

auto encryption and decryption of files during log in and log off

we r to develope a project which involves automatic encryption of all the text files user was working upon during logg off and to decrypt them during log on this is to be done by writing a shell script can anyone help (2 Replies)
Discussion started by: vyom
2 Replies

4. Ubuntu

help regarding encryption and decryption of files on linux

we are to develope a project on linux whose aim is to automatically encrypt files after logoff and to decrypt them using password after log in this is to be made by chging source code of linux ........... can any one help me on this???? (1 Reply)
Discussion started by: vyom
1 Replies

5. Shell Programming and Scripting

String encryption and decryption

Hello All, There are so many questions on this and I didn't find any concluded answer. I want to encrypt a string in the script, actually this is a password. I tried using openssl (I am a newbie to openssl), but it is generating a long one which we can't remember. I want to encrypt the... (5 Replies)
Discussion started by: karumudi7
5 Replies

6. Shell Programming and Scripting

Password decryption

Hi, I don't know if I am in a correct category with my question. I want to know what decryption-method is used for this password: (1) The first stadium is (its stored in the settings.xml of my software):... (2 Replies)
Discussion started by: Mogli1977
2 Replies

7. UNIX for Dummies Questions & Answers

Identify a file for encryption or decryption

Dear Members, Can we find if a particular file is encrypted or decrypted. I need a command by which i should be able to identify if a file is encrypted or decrypted. How can we do this? (1 Reply)
Discussion started by: sandeep_1105
1 Replies

8. Solaris

encryption & decryption functions in sun solaries

hi, is there any library functions available in sun solaries for encryption and decryption functions. regards suresh (1 Reply)
Discussion started by: suresh_rtp
1 Replies

9. Solaris

PGP encryption/decryption solaris 9

Hi Someone is going to send me a file that they have encrypted by PGP encryption on windows pc to my solaris 9 server. They will give me the pgp key to decrypt the file. How can I do this on solaris 9 Is there a tool installed by default to decrypt or do I need to install something to... (0 Replies)
Discussion started by: frustrated1
0 Replies

10. UNIX for Dummies Questions & Answers

File Encryption and Decryption in UNIX.

Hello guys ! I have used "crypt <first> second" command to encrypt "first" to "second" file. i have assign a key for that of course. Now when i try to look content of "seocnd" file through "cat second" command, the file is encrypted and cannot be read which is according to plan. But when... (3 Replies)
Discussion started by: abidmalik
3 Replies
Login or Register to Ask a Question