Sponsored Content
Top Forums Shell Programming and Scripting passing database password to isql command in shell script Post 302427092 by curleb on Thursday 3rd of June 2010 09:16:41 PM
Old 06-03-2010
very unlikely, although you'd probably be able to obfuscate it somewhat...

One option I've seen used is to provide a secondary script that is sourced into use, which actually provides the password. It serves to abstract the password from general population (that would be accessing your primary SQL file), but as with any command line parameter, it's still visible from any ps listing. Sort of like moving the password from the script, but putting it within easy reach of anyone with command line access.

You could also look into maybe setting up an ssh Tunnel that would effectively broker the call for you, but I've not done it myself either, so that's pretty much conjecture.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

passing password in shell script

Hi, Anybody help to write a shell script as below requirement. script stops some costomized application services. 1. first it will stop apache as root 2. then it will switch to my application user and stop app service. Note: passing password is required to stop app service as app... (1 Reply)
Discussion started by: manojbarot1
1 Replies

2. Shell Programming and Scripting

Passing parameters to Shell script for GREP command

I am using grep to capture date from a file . Since i need to use the shell script for different dates ,is it possible to pass the date parameter to the shell script the Script is as below grep -E "08 Aug 2008|2008-08-08"* somefile.txt>test.txt The above script file greps the... (1 Reply)
Discussion started by: sud.tech
1 Replies

3. Shell Programming and Scripting

Passing Shell Variables in ISQL

Hi.. I am passing a variable in my shell function. I need to access it for an isql comand in the shell script. However the isql o/p gives no results if i pass a variable in the command. The isql command works perfectly fine if i hardcore the table name. My script is : ... (0 Replies)
Discussion started by: dikki
0 Replies

4. Shell Programming and Scripting

ssh - passing password in shell script

I have a requirement, I need to run a command at remote system using a ssh. Is there any way we can pass the username and password in shell script to the ssh command as we did it in one of the shell script for FTP. ftp -n $i <<!EOF >> user Username $PASSWD cd /home/scripts ... (5 Replies)
Discussion started by: Muktesh
5 Replies

5. UNIX for Dummies Questions & Answers

Passing command output as an argument to a shell script

Hi, I have a very small requirement where i need to pass command output as an argument while invoking the shell script.. I need to call like this sh testscript.sh ' ls -t Appl*and*abc* | head -n 1' This will list one file name as ana argument.. I will be using "$1" in the shell... (2 Replies)
Discussion started by: pssandeep
2 Replies

6. Shell Programming and Scripting

passing password to a command

Hi all, I have the expect binaries in our boxes.. I want to pass a passwd to a command automatically without manual intervention using "/<path_of_expect>/expect/<version>/bin/autopasswd" The below command will ask passwd in my script cleartool rmtag -all <vob_tag> #Some... (4 Replies)
Discussion started by: raghu.iv85
4 Replies

7. Shell Programming and Scripting

Passing arguments from a bash shell script to a command

I'm pretty new to bash scripting and I've found myself writing things like this (and the same with even more nesting): if $CATEGORIES; then if $LABEL_SLOTS; then $pyth "$wd/texify_grammar.py" "$input" "$texfile" "--label-slots" "--categories" "$CATEGORY_LIST" ... (9 Replies)
Discussion started by: burbly
9 Replies

8. Shell Programming and Scripting

Passing password with SSH command

Hi Experts, I have specific requirement where I want to pass the password with the ssh username@hostname command . I dont want to use RSA public and private keys also. Because that will be on production server and no one wants to give access like that. Second thing it is production... (14 Replies)
Discussion started by: sharsour
14 Replies

9. UNIX for Dummies Questions & Answers

Passing shell script parameter value to awk command in side the script

I have a shell script (.sh) and I want to pass a parameter value to the awk command but I am getting exception, please assist. diff=$1$2.diff id=$2 new=new_$diff echo "My id is $1" echo "I want to sync for user account $id" ##awk command I am using is as below cat $diff |... (1 Reply)
Discussion started by: Sarita Behera
1 Replies

10. Shell Programming and Scripting

Passing Username & password through shell script to java code

Hi, I have a shell script (script.sh) in which we are calling java code which asks for Username: Password: for authentication purpose currently we are passing the credential manually and run the script. but I am trying echo -e "user_id\npassword" | script.sh but its not... (1 Reply)
Discussion started by: rakeshtomar82
1 Replies
script(1)							   User Commands							 script(1)

NAME
script - make record of a terminal session SYNOPSIS
script [-a] [filename] DESCRIPTION
The script utility makes a record of everything printed on your screen. The record is written to filename. If no file name is given, the record is saved in the file typescript. See WARNINGS. The script command forks and creates a sub-shell, according to the value of $SHELL, and records the text from this session. The script ends when the forked shell exits or when Control-d is typed. OPTIONS
The following option is supported: -a Appends the session record to filename, rather than overwriting it. NOTES
script places everything that appears on the screen in filename, including prompts. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ |CSI |Enabled | +-----------------------------+-----------------------------+ SEE ALSO
attributes(5) WARNINGS
script can pose a security risk when used in directories that are writable by other users (for example, /tmp), especially when run by a privileged user, that is, root. Be sure that typescript is not a link before running script. SunOS 5.11 30 Jan 2004 script(1)
All times are GMT -4. The time now is 09:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy