Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Search Forums:



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 07-30-2010
Registered User
 

Join Date: Jul 2010
Posts: 7
Thanks: 2
Thanked 0 Times in 0 Posts
Hide user id and password for Sql*Loader

Hi all,
I'm new here please comment me if I do something wrong.

I need help on how to hide the user id / password. I don't want to show id and password on the parameter like this example code.

Code:
sqlldr userid/pass control=test.ctl log=test.log bad=test.bad discard=test.dsc


I find solution that we can use parameter file(parfile) command

test.par
Code:
userid=userid/pass
control=test.ctl
log=test.log
bad=test.bad
discard=test.dsc

shell
Code:
sqlldr parfile=test.par

I need to know:
1) Can i just only hide the userid only.
2) Is there other way to hide the userid e.g using flat file
Sponsored Links
    #2  
Old 08-03-2010
Registered User
 

Join Date: May 2008
Location: Maryland, USA
Posts: 307
Thanks: 2
Thanked 28 Times in 20 Posts
You want to hide the userid, but not the password?
That's the reverse of what is normally wanted, but OK.
I assume this a shell script.

You can create a text file, say ~/text/privatestuff with contents like this:

Code:
userid=shadow_max85

Set it so only you can read it:
Code:
chmod 600 ~/text/privatestuff

Then in your main script file, use it like this:
Code:
. ~/text/privatestuff
sqlldr $userid/pass control=test.ctl log=test.log bad=test.bad discard=test.dsc

The first line is: period, space, filepath. It causes the contents of the file to be executed in the current process. It doesn't even need to be an executable file.
The Following User Says Thank You to KenJackson For This Useful Post:
shadow_max85 (08-03-2010)
Sponsored Links
    #3  
Old 08-03-2010
Registered User
 

Join Date: Jul 2010
Posts: 7
Thanks: 2
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by KenJackson View Post
You want to hide the userid, but not the password?
That's the reverse of what is normally wanted, but OK.
I assume this a shell script.
Thank so much.
But I thinks u misunderstand me. I need to hide user id and also the password.

Quote:
Originally Posted by KenJackson View Post
You can create a text file, say ~/text/privatestuff with contents like this:

Code:
userid=shadow_max85

Set it so only you can read it:
Code:
chmod 600 ~/text/privatestuff

With above condition(hiding userid/password). Can i put both user id and password in one text file.
~/text/privatestuff
Code:
userid=shadow_max85/pass

Quote:
Originally Posted by KenJackson View Post
Then in your main script file, use it like this:
Code:
. ~/text/privatestuff
sqlldr $userid/pass control=test.ctl log=test.log bad=test.bad discard=test.dsc

The first line is: period, space, filepath. It causes the contents of the file to be executed in the current process. It doesn't even need to be an executable file.
Then do this at main script:
Code:
. ~/text/privatestuff
sqlldr $userid control=test.ctl log=test.log bad=test.bad discard=test.dsc

    #4  
Old 08-03-2010
Registered User
 

Join Date: May 2008
Location: Maryland, USA
Posts: 307
Thanks: 2
Thanked 28 Times in 20 Posts
Yes. That looks like it should work.
Sponsored Links
    #5  
Old 08-11-2010
Registered User
 

Join Date: Jul 2010
Posts: 7
Thanks: 2
Thanked 0 Times in 0 Posts
B.U.M.P

Thanks KenJackson,

But i have to bring up my post again. Not that the solution given is not working. It work fine but the id and password is still visible while running the script. user still can see the id and password.

To give idea what i talking about. i want to hide the id and password similar like this code for Sql*plus.

sql file name logon.sql
Code:
connect shadow_max85/pass

in the main script
Code:
sqlplus /nolog <<EOF
@/home/logon.sql

Sponsored Links
    #6  
Old 08-12-2010
Yogesh Sawant's Avatar
Full Time Dad
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 1,211
Thanks: 6
Thanked 17 Times in 16 Posts
if you are looking for a comprehensive solution to hide usernames and passwords, why don't you consider keyczar
Sponsored Links
    #7  
Old 08-12-2010
Registered User
 

Join Date: Jul 2010
Posts: 7
Thanks: 2
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Yogesh Sawant View Post
if you are looking for a comprehensive solution to hide usernames and passwords, why don't you consider keyczar
Thanks for the suggestion but i don't thinks that the solution that i looking for.
Sponsored Links
Closed Thread

Tags
login, sql*loader, sqlldr, sqlloader, userid

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How can i hide username/password temhem UNIX for Dummies Questions & Answers 1 04-27-2010 04:52 AM
Hide Password whatisthis Shell Programming and Scripting 4 07-21-2008 08:59 AM
How Do I Hide the Password in a Script samd Shell Programming and Scripting 6 11-22-2006 04:38 AM
Want to hide password arpitk Shell Programming and Scripting 1 09-29-2006 08:42 AM
hide password typing ivancheung Programming 2 09-30-2004 01:05 PM



All times are GMT -4. The time now is 03:29 AM.