Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to hide sqlplus login/passwd

Re: How to hide sqlplus login/passwd

From: <rspeaker_at_my-dejanews.com>
Date: Tue, 29 Dec 1998 20:44:35 GMT
Message-ID: <76bevj$8g2$1@nnrp1.dejanews.com>


Here is one way you may be able to do this:

(1) create a dummy user account in Oracle, with the barest of priviliges, just enough to connect to the database
(2) create a script called connect.sql (or whatever) that contains

     connect youruserid/yourpass
    and make it read accessible by only you (3) create a shell script like runsql that contains

     sqlplus dumb/dumber @connect.sql

this will log you in to the database as dumb, then issue a connect command with your correct username and password. The ps -ef | grep sqlplus listing will show sqlplus dumb/dumber @connect.sql, which isn't ideal, but if your connect.sql file is protected, you should be okay.

HTH
Roy

In article <slrn78f2dg.179.dhaley_at_dhcp132.corp.merc.com>,   dhaley_at_infobeat.com wrote:
> I happened to see this thread and it offered good suggestions on
> hiding username/password when running an sql command and then
> returning to unix.
>
> How can I hide username/password when I just want to enter sqlplus
> and run commands from the sql> prompt?
>
> Here is what I tried:
>
> **
> sqlplus $LOGNAME@$HOSTNAME < $PASS > mylog.out
> **
> where $PASS is a file only I can read.
>
> This dumps me back on the command line and leaves
> this in my output file:
>
> SQL*Plus: Release 3.3.4.0.1 - Production on Mon Dec 28 18:33:23 1998
>
> Copyright (c) Oracle Corporation 1979, 1996. All rights reserved.
>
> Enter password:
>
> Connected to:
> Oracle7 Server Release 7.2.3.0.0 - Production Release
> With the distributed option
> PL/SQL Release 2.2.3.0.0 - Production
>
> SQL> Disconnected from Oracle7 Server Release 7.2.3.0.0 - Production Release
> With the distributed option
> PL/SQL Release 2.2.3.0.0 - Production
>
> For some reason it disconnects me :-(
>
> I want to alias this kind of command so I don't have to enter my username/
> password all the time but so people can't see my password with
> ps -af | grep sqlplus
>
> Thanks
> Damon Haley
>

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Tue Dec 29 1998 - 14:44:35 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US