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

Home -> Community -> Usenet -> c.d.o.server -> Re: Switch-user equivalent

Re: Switch-user equivalent

From: Francis Mignault <FMIG_at_NT.COM>
Date: Wed, 22 Jul 1998 16:13:27 -0400
Message-ID: <35B647E7.28DFB5ED@NT.COM>


To temporarily become another user and give it back his old password, do the following :

SQL> select password from dba_users where username = 'SCOTT';

PASSWORD



F894844C34402B67

SQL> alter user scott identified by lion; User altered.

SQL> connect scott/lion
Connected.

SQL> connect system/manager
connected.

SQL> alter user scott identified by values 'F894844C34402B67'; User altered.

SQL> connect scott/tiger
Connected.

The password is restored to the original !!

Francis

BADRI wrote:
>
> Hi:
>
> I need a switch-user equivalent in Oracle. I dont want to know
> the password for someone, but want to log in as that person. I can
> settle for a workaround if available, but if I change the password
> of that user, I want to put it back to what it was before I changed
> it, without knowing what it was.
>
> Suppose there us a user names jack with a password Jill. I, the
> DBA does not know the password Jill. I want to change the password
> temporarily to another value, use the id and then set-it back to
> the old value - like the 'su' equivalent in UNIX.
>
> Is there a way I can alter the user Jack's password to test and then
> put it back to Jill using the encrypted value of the password?
>
> I read somewhere that there is a syntax like alter user <username>
> identified as <hexvalue> ; will change the password to the text
> equivalent of the hexvalue (instead of the hexvalue used as a text string).
>
> Any help will be greatly appreciated.
>
> thanks,
>
> -Badri
Received on Wed Jul 22 1998 - 15:13:27 CDT

Original text of this message

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