DB2 Connect Encrypt Password


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting DB2 Connect Encrypt Password
# 1  
Old 03-28-2011
DB2 Connect Encrypt Password

Hi All,

If someone can help me with password encryption. We have shell scripts that connect to a database using db2 connect and we have the password hardcoded in the script.

Can someone let me know if there's a way to encrypt this password?

I've seen alot of users suggest we create an environmental variable in another file with very limited rights but unfortunately we are not the root users on this box and the root users will still have access to that box.

Thanks
# 2  
Old 03-28-2011
It's useless to encrypt a password if you can't keep it encrypted. The instant you decrypt it again, it's vulnerable. Including the decryption method in the script just makes it sillier -- they can see exactly what you did and duplicate it. For that matter, they might not even need your password to get into your db2 database, since they're root.

You can't protect anything from root. They can even get into /etc/shadow.
# 3  
Old 03-28-2011
They are the root of our UNIX servers not our database admins. So that is what I am asking if anyone knows a way to have encrypted on the UNIX server and have the db2 connect decrypt it when it tries to connect.
# 4  
Old 03-28-2011
The db2 server is on a different machine, then?

---------- Post updated at 10:28 AM ---------- Previous update was at 10:22 AM ----------

Moot point, I think. You can't prevent root from examining what your script is doing and perfectly duplicating it. You can't protect anything from root. A system where you need to try to do so is a pretty messed up security model.

Last edited by Corona688; 03-28-2011 at 02:36 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Connect to Remote DB2 ,using URL ,username,Password

Hi All, I am new to Shell scripting, I want to connect to DB2 database through URL,username and password Please help me out. I read so many posts in that there is no where it is mentioned about how to connect to a remote database. Thanks in advance :) (0 Replies)
Discussion started by: Rohit G
0 Replies

2. Shell Programming and Scripting

How to connect DB2 using SSH?

How to connect db2 IBM on AIX using SSH - SecureCRT ? Please help me. (3 Replies)
Discussion started by: meomeo87
3 Replies

3. UNIX for Dummies Questions & Answers

How to connect to DB2 using UNIX

I am new to Putty, Unix and DB2 and this is what I am working on right now. I installed Putty I got access to username / pwd I got Unix usrname/Pwd.also got the home directory once I login into putty I get the screen and it shows $ sign From here how do I connect to DB2 database? I have... (2 Replies)
Discussion started by: JayDoshi
2 Replies

4. Shell Programming and Scripting

DB2 Connect issue

Hi i m trying to connect DB2 via unix. it is successfully connect. but the connect is getting disconnect . below is the query , countvalue=$(db2 "connect to <Database> user <username> using <Password>" | db2 -x 'select count(*) from <tablename>' ); echo $countvalue while... (2 Replies)
Discussion started by: baskivs
2 Replies

5. Shell Programming and Scripting

Encrypt password but use * when typing password

Hi, I came across the following script for encrypting the password in this forum #! /usr/bin/ksh exec 4>/dev/tty function getpass { typeset prompt=$1 typeset backspace=$(echo \\b\\c) typeset enter=$(echo \\r\\c) typeset savesetting=$(stty -g) ... (9 Replies)
Discussion started by: dbashyam
9 Replies

6. Shell Programming and Scripting

connect to db2 using shell script

Guys, I am trying to write a shell script that connect to wcsprod database and read the query #!/bin/ksh sqlplus -s < connect to wcsprod user wcsadm using pwd > select * from catentry fetch first 1 row only with ur; databse: wcsprod user: wcsadm pwd: pwd thanks (1 Reply)
Discussion started by: skatpally
1 Replies

7. Shell Programming and Scripting

Connect db2 using db2 connect

I want to connect to DB2 database which is mainframes using a unix script and run query and get the result set into the unix box. Is this acheivable using db2 connect? pls help me with a sample script which can perform the same. (1 Reply)
Discussion started by: midhun19
1 Replies

8. Shell Programming and Scripting

Connect to DB2 table using Shell scripts

Can anyone please help me with an unix shell script to connect a DB2 database. My requirement is just to display the no of records present in a table of a DB2 database through Unix Shell script. Thx - Ram (1 Reply)
Discussion started by: onlyraja
1 Replies

9. Shell Programming and Scripting

How to Encrypt password

Hello, I have a paramter file, In which I store all the user-ids and passwords for the project. So if a user just invokes the paramter file he has access to all the variables, which i have exported in the parmatere file. Now if a user echo's the variable which stores the databse password.... (1 Reply)
Discussion started by: DSDexter
1 Replies

10. Shell Programming and Scripting

connect to Db2 thru Unix

I need to connect to DB2 through Unix and check whether the database is up or not. We are planning to use Neon shadow direct to connect to the same. I would like to know how to pass parameters to neon shadow direct. Any guidance/help in this regard would be helpful. My unix box is AIX 1. ... (3 Replies)
Discussion started by: ranj@tcs
3 Replies
Login or Register to Ask a Question

Featured Tech Videos