Hide Passwords


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Hide Passwords
# 1  
Old 04-04-2005
Hide Passwords

Is there a way not to display the password in the sys out when your korn shell script logs into sqlplus?
# 2  
Old 04-04-2005
This is a common problem. i have seen it done before using sed and redirection but I dont know the syntax. Here is a thread I came across while searching. Hope this helps.
# 3  
Old 04-04-2005
Two more suggestions:

1) You can echo the password to a sqlplus and use a here document:
Code:
echo $password | sqlplus username <<EOF
some SQL
EOF

2) You can use a named pipe:
Code:
mknod logon_credentials.sql p
chmod 600 logon_credentials.sql
echo "connect username/password" > logon_credentials.sql &
sqlplus /nolog <<EOF
@logon_credentials.sql
some SQL
EOF
rm logon.credentials.sql

# 4  
Old 04-05-2005
I listed the following as a possible solution, but it is certainly not for every situation. If you use an OPS$ account, be sure to set REMOTE_OS_AUTHENT=FALSE in the init.ora to prevent remote OPS calls.

You can create an OPS$username account by performing the following steps:

Log into the Oracle database as the a user with DBA privs.

Type the following,
CREATE USER OPS$username IDENTIFIED EXTERNALLY;

where username matches your current UNIX login name.

Type the following:
GRANT CONNECT, <what ever other privs you want to grant> TO OPS$username;

This will allow you to access Oracle by simply typing,

sqlplus /

at the UNIX system prompt. No username or password needs to be specified. Thus the benefit and the risk.

Keith
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

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

2. UNIX for Advanced & Expert Users

When did UNIX start using encrypted passwords, and not displaying passwords when you type them in?

I've been using various versions of UNIX and Linux since 1993, and I've never run across one that showed your password as you type it in when you log in, or one that stored passwords in plain text rather than encrypted. I'm writing a script for work for a security audit, and two of the... (5 Replies)
Discussion started by: Anne Neville
5 Replies

3. Shell Programming and Scripting

ls - hide permissions

I'm listing the files in a particular directory using the ls command... $ ls -ogh total 9.4G -rw-r--r-- 1 1.9G Nov 4 02:29 file1.tar -rw-r--r-- 1 1.9G Nov 11 03:11 file2.tar -rw-r--r-- 1 1.9G Nov 18 02:55 file3.tar -rw-r--r-- 1 1.9G Nov 25 03:11 file4.tar -rw-r--r-- 1 1.9G Dec 2 02:46... (3 Replies)
Discussion started by: cdunavent
3 Replies

4. Cybersecurity

how to Hide Passwords From UNIX ps Command

Hi, By reporting the process status with ps, any Unix user will see the command line arguments #ps -ef UID PID PPID C STIME TTY TIME CMD lsc 13837 13825 0 May 11 pts/17 0:01 -ksh oracle 4698 6294 0 12:00:40 ? 0:00 sqlplus -s system/manager appluser 4229 4062 0 12:00:03... (2 Replies)
Discussion started by: bhagirathi
2 Replies

5. Shell Programming and Scripting

Hide process

Hi friends, I want (a C++ code) to hide process in kernel 2.6, I don't want monitoring even in /proc. please help me. Regards, Eilya (3 Replies)
Discussion started by: Eilya
3 Replies

6. Shell Programming and Scripting

How to hide folders

hello everybody, i would like to hide visibility of the folders , i.e. not to giving any physically visibility to any users . Is there any way to do it other than changing the permission and adding "." post folder name . by changing the permission , we cann't do any activity , but have... (1 Reply)
Discussion started by: manas_ranjan
1 Replies

7. Shell Programming and Scripting

Want to hide password

All, In my script I am calling another script.. in that script I need to enter a password. Problem is that everyone is able to see the password when I enter that. Is there any way that when i enter that password it should not display or may look like *******. Or if there any other way that I... (1 Reply)
Discussion started by: arpitk
1 Replies

8. Shell Programming and Scripting

Hide a script ?

Hi all, i have a perl script for my users to run. My sys admin created an account for the users to log in and execute the script. They just type "perl myscript.pl" at the unix prompt to run it. Is there any way that i can hide my script? ,ie, do not allow my users to view the script. either... (5 Replies)
Discussion started by: new2ss
5 Replies

9. UNIX for Dummies Questions & Answers

Hide Directory name

Hello everyone, i am new to unix and still learning about different commands. Can some one tell me how can i hide my directory name. For instance someone is logged in a directory named $ . I've seen some people hiding their above path name by just one word or letter like $ in order to keep... (7 Replies)
Discussion started by: a25khan
7 Replies
Login or Register to Ask a Question