Sponsored Content
Top Forums Shell Programming and Scripting How to pass decrypted password to script Post 302565217 by Nick1971 on Monday 17th of October 2011 10:00:34 AM
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
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
NE_SSL_CLIENT_CERT(3)						neon API reference					     NE_SSL_CLIENT_CERT(3)

NAME
ne_ssl_clicert_read, ne_ssl_clicert_name, ne_ssl_clicert_encrypted, ne_ssl_clicert_decrypt, ne_ssl_clicert_owner, ne_ssl_clicert_free - SSL client certificate handling SYNOPSIS
#include <ne_ssl.h> ne_ssl_client_cert *ne_ssl_clicert_read(const char *filename); const char *ne_ssl_clicert_name(const ne_ssl_client_cert *ccert); int ne_ssl_clicert_encrypted(const ne_ssl_client_cert *ccert); int ne_ssl_clicert_decrypt(ne_ssl_client_cert *ccert, const char *password); const ne_ssl_certificate *ne_ssl_clicert_owner(const ne_ssl_client_cert *ccert); void ne_ssl_clicert_free(ne_ssl_client_cert *ccert); DESCRIPTION
The ne_ssl_clicert_read function reads a client certificate from a PKCS#12-formatted file, and returns an ne_ssl_client_cert object. If the client certificate is encrypted, it must be decrypted before it is used. An ne_ssl_client_cert object holds a client certificate and the associated private key, not just a certificate; the term "client certificate" will used to refer to this pair. A client certificate can be in one of two states: encrypted or decrypted. The ne_ssl_clicert_encrypted function will return non-zero if the client certificate is in the encrypted state. A client certificate object returned by ne_ssl_clicert_read may be initially in either state, depending on whether the file was encrypted or not. ne_ssl_clicert_decrypt can be used to decrypt a client certificate using the appropriate password. This function must only be called if the object is in the encrypted state; if decryption fails, the certificate state does not change, so decryption can be attempted more than once using different passwords. A client certificate can be given a "friendly name" when it is created; ne_ssl_clicert_name will return this name (or NULL if no friendly name was specified). ne_ssl_clicert_name can be used when the client certificate is in either the encrypted or decrypted state, and will return the same string for the lifetime of the object. The function ne_ssl_clicert_owner returns the certificate part of the client certificate; it must only be called if the client certificate is in the decrypted state. When the client certificate is no longer needed, the ne_ssl_clicert_free function should be used to destroy the object. RETURN VALUE
ne_ssl_clicert_read returns a client certificate object, or NULL if the file could not be read. ne_ssl_clicert_encrypted returns zero if the object is in the decrypted state, or non-zero if it is in the encrypted state. ne_ssl_clicert_name returns a NUL-terminated friendly name string, or NULL. ne_ssl_clicert_owner returns a certificate object. EXAMPLES
The following code reads a client certificate and decrypts it if necessary, then loads it into an HTTP session. ne_ssl_client_cert *ccert; ccert = ne_ssl_clicert_read("/path/to/client.p12"); if (ccert == NULL) { /* handle error... */ } else if (ne_ssl_clicert_encrypted(ccert)) { char *password = prompt_for_password(); if (ne_ssl_clicert_decrypt(ccert, password)) { /* could not decrypt! handle error... */ } } ne_ssl_set_clicert(sess, ccert); SEE ALSO
ne_ssl_cert_read AUTHOR
Joe Orton <neon@lists.manyfish.co.uk> Author. COPYRIGHT
neon 0.29.6 3 May 2011 NE_SSL_CLIENT_CERT(3)
All times are GMT -4. The time now is 05:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy