How to pass decrypted password to script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to pass decrypted password to script
# 1  
Old 10-17-2011
How to pass decrypted password to script

Hi Everybody,

I am trying to write a script (ksh) to connect to oracle db via sqlplus.
As I do not want the password to be in plain text, I've tried to use java to encrypt and decrypt it but I am not sure how can I pass the decrypted password to the script. Pls advise.

Below is what I would like to achieve :

connect username/decrypted password@sid

Rgds,
Nick
# 2  
Old 10-17-2011
Code:
connect username/$(java DecryptionClass)@sid

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to pass root password with su and command?

Hello, I have list of around 400 devices. I need to restart a service /etc/init.d/psap23.sh in all of them, but it should restart by root only. Those have some other kind of light Linux. There is no sudo package in that and we can't/shouldn't install. Direct root login is not allowed. I login... (5 Replies)
Discussion started by: solaris_1977
5 Replies

2. Shell Programming and Scripting

Pass the password to su in shell script

Hello, I am using below command but this is asking for tty c42dba {/home/oracle}: echo sersnp | su -c ggs standard in must be a tty Best regards, Vishal (4 Replies)
Discussion started by: admin_db
4 Replies

3. Shell Programming and Scripting

How to pass password to "su account" in script?

Hi, I need to run a test script to check all test accounts, is it possible to pass the password to su in following command? I've got following error: $ echo "${password}" | su ${test_account} -c "check_account.sh" standard in must be a tty Thank you. - j (3 Replies)
Discussion started by: hce
3 Replies

4. Shell Programming and Scripting

How to use 'expect' to pass UID & Password to a "for loop" in shell script?

Friends, Need someone's help in helping me with the below requirement for a script: > For a list of servers(over 100+), I need to login into each of them(cannot configure password-less ssh) & grab few configuration details < I know, this is possible through expect programming in a simple... (14 Replies)
Discussion started by: thisissouvik
14 Replies

5. AIX

How to use 'expect' to pass UID & Password to a "for loop" in shell script?

Friends, Need someone's help in helping me with the below requirement for a script: > For a list of servers(over 100+), I need to login into each of them(cannot configure password-less ssh) & grab few configuration details < I know, this is possible through expect programming in a simple... (2 Replies)
Discussion started by: thisissouvik
2 Replies

6. UNIX for Advanced & Expert Users

How to auto pass password in shell script !

Hi all, I have a simple script to check the CPU, Swap Memory and Hard Disk. But I can auto assign password in the script to automatic run it in crontab. Everytime when I run this script, it require to insert password like the message below : How can I solve this problem ? (2 Replies)
Discussion started by: cafecoc85
2 Replies

7. Shell Programming and Scripting

Pass root password through script

I have several clients (over 120) connected to my server. I want to push some patch to all the client using a script which copies the file from the server to a specific path on the client and then installs it. But for installation of the patch, it needs to be done thorough root login on client.... (7 Replies)
Discussion started by: shahdeo
7 Replies

8. Shell Programming and Scripting

pass a password to an application

Hi folks I am new to shellscripting and I try to automate & guify some jobs. Suppose I have a variable the stores a passwd and an application like "gpg" or "zip" to run from withn the script. how do I pass that passwd (the content of the variable) to the application being called? eg. ... (4 Replies)
Discussion started by: latenite
4 Replies

9. Solaris

Lost password on Sun Solaris; can it be decrypted

Hi, I lost my password on few critical sun servers, I have root password though I don't want to change my password but for some reasons I would like to decrypt my exiting password. Is it possbile and if yes how? Thanks a million in advance (6 Replies)
Discussion started by: newbewie
6 Replies

10. UNIX for Dummies Questions & Answers

pass the password to SU??

hi, i have a lot of su in my script. and it keeps asking for a password every single time. how can i pass the password to su command? any setup i need to do? i used a redirect, not working. su -username - c "command" < "password" thanks for any help! (5 Replies)
Discussion started by: bikoyski
5 Replies
Login or Register to Ask a Question