to hide uname and pwd


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting to hide uname and pwd
# 1  
Old 02-25-2012
to hide uname and pwd

Hi all,
In Unix shell script i am connecting to oracle database and it is executing fine,
my problem is my user name and password is visible for all, how to hide.

Note -- username and password is hard coded, it is my requirement
example--
Code:
#!/bin/sh
------
------
sqlplus uname/pwd @ggg.world <<kkk
select * from ------
------
-----;
kkk

please help me


Thanks,
Krupa

Last edited by methyl; 02-26-2012 at 04:39 PM.. Reason: please use code tags
# 2  
Old 02-25-2012
Hi,

you can use config file to store the DB details and don't provide even read permission to that config file to anyone else except you.
you can read the config file from shell script to get your required DB details.

Cheers,
RangaSmilie
# 3  
Old 02-25-2012
There are ample of tools available in unix to encrypt your clear test password and decrypt it while you use again .refer the following .

Code:
echo off
read pass
echo on
encr=`echo $pass | base64`
decr=`echo $encr | base64 --decode`

then use

Code:
sqlplus uname/$decr @ggg.world <<kkk

# 4  
Old 02-25-2012
Login within the SQL program not from the command line.
Code:
connect ....

# 5  
Old 02-26-2012
Hi Cheers,

Thanks for your advice.
could you please provide more details with a sample example it would be grateful for me.

Thanks,
Krupa


Quote:
Originally Posted by rangarasan
Hi,

you can use config file to store the DB details and don't provide even read permission to that config file to anyone else except you.
you can read the config file from shell script to get your required DB details.

Cheers,
RangaSmilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Linux

Difference between UNAME and WHO

Hi, What is the exact output tells me when i issued UNAME and WHO ? Regards, Nantha.Y (2 Replies)
Discussion started by: Nandy
2 Replies

2. Programming

How to hide from UNIX strings - obfuscate or hide a literal or constant?

Hi, I need to somehow pipe the password to a command and run some SQL, for example, something like echo $password | sqlplus -s system @query01.sql To make it not so obvious, I decided to try out writing a small C program that basically just do echo $password. So now I just do x9.out | sqlplus... (8 Replies)
Discussion started by: newbie_01
8 Replies

3. Solaris

uname -a

bssmsrv223:/ 53 ] uname -a SunOS bssmsrv223 5.10 Generic_118833-36 sun4u sparc SUNW,Sun-Fire-V245 bssmsrv223:/ 54 ] what does 118833-36 denotes in Generic_118833-36 (2 Replies)
Discussion started by: hiten.r.chauhan
2 Replies

4. AIX

sync samba pwd with aix5.3 pwd

currently, my samba login works just fine. i want my clients to use aix5.3 account to login to samba so they don't have to change samba pwd and aix pwd. i googled, and vi /usr/lib/smb.conf per some of knowledge base, but i could not get to work. aix5.3 and samba 3.0.24.0 thanks in advace..... (2 Replies)
Discussion started by: tjmannonline
2 Replies

5. UNIX for Advanced & Expert Users

tr command with uname -n

Using the command : echo $eup_terminal_code | tr -s 'mil vrn qcm' 'mci pql qcm' it works,but this translation changes depending on the system. I'd like to define the following variables ,one for each system : mil22h_from='mil vrn frl' mil22h_to='mci vci fci' ... (4 Replies)
Discussion started by: Pierluigi.sala
4 Replies

6. Solaris

uname help

hi all, Operating System Name : Unix Sun Solaris Operating system release level : 5.10 Operating system version : Generic_137111-06 i know the release level that is kernel version Generic_137111-06 what is number... (6 Replies)
Discussion started by: coxmanchester
6 Replies

7. UNIX for Advanced & Expert Users

echo ${PWD#${PWD%/*/*}/}

Can anyone explain this in detail ... echo ${PWD#${PWD%/*/*}/} Thanks in Advance (1 Reply)
Discussion started by: sakthi.abdullah
1 Replies

8. Linux

Uname

what is the difference between uname -m and uname -i what it actually means (2 Replies)
Discussion started by: Dileepsp
2 Replies

9. AIX

uname -S

hi , i have made a mistake :( on the production enviourment by change tha host name . after that i returned back the old name. but i think this will not afeect the system until reboot the machine. laso i tried to telnet the syetem by the host name not by the IP address and it works fine. ... (2 Replies)
Discussion started by: habuzahra
2 Replies

10. UNIX for Dummies Questions & Answers

Wrong 'uname' )

Hi ! I heard that root can modify the uname -command, so it will show the wrong kernel version. Is it true? can you tell more about this /give links ? system: linux/*bsd. thanks in advance (14 Replies)
Discussion started by: DCrystal
14 Replies
Login or Register to Ask a Question