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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: DBA_USERS view

Re: DBA_USERS view

From: Rodd Holman <rodney.holman_at_lodgenet.com>
Date: Tue, 03 Apr 2001 14:03:45 -0700
Message-ID: <F001.002E0862.20010403140653@fatcity.com>

You can use it to swap out a user's password for diagnostics. An example is listed in the Oracle DBA Handbook. Basically you can create a temp table to store the value:
CREATE TABLE TEMP_USER AS SELECT USERNAME, PASSWORD FROM DBA_USERS WHERE USERNAME = 'XYZ'; Then alter the user for whatever:
ALTER USER XYZ IDENTIFIED BY NEWPASSWORD; CONNECT XYZ/NEWPASSWORD Do your stuff then reset the password:
ALTER USER XYZ IDENTIFIED BY VALUE (SELECT PASSWORD FROM TEMP_USER WHERE USER = 'XYZ'); User's password is reset to what it was and you never needed to get it from them. Why would you do this? As DBA you have absolute access to everything. This lets you see the database from their viewpoint, with their access rights. Could be helpful when trying to recreate a permissions related error that you don't get as yourself.

On Tuesday 03 April 2001 16:16, you wrote:
> > -----Original Message-----
> > From: Stefan Jahnke [ mailto:stefan.jahnke_at_d2vodafone.de
>
> <mailto:stefan.jahnke_at_d2vodafone.de> ]
>
> > what information does the PASSWORD column in the DBA_USERS
> > view provide.
> > I know that it's the encrypted user password, but how can I
> > actually use
> > it ?
> > For example: Can I reassign a password to a user via his encrypted
> > password ?
> > or: Can I test a logon with another user's encrpyted user password to
> > test the logon ?
> > I tried stuff like connect myuser/0CE92663BBC6FC34_at_MYDB, but that
> > doesn't seem to work.
>
> I forget, did anyone answer this question?
> You can use it with the (undocumented as far as I know) 'identified by
> values' option of the alter user statement. This can be handy if you
> want to sign on as user X without changing their password. Make their
> password something you know, login with that password, then change their
> password back to the old password. Example:
>
> SQL> create user x identified by old_password ;
>
> User created.
>
> SQL> grant create session to x ;
>
> Grant succeeded.
>
> SQL> select password from dba_users where username = 'X' ;
>
> PASSWORD
> ------------------------------
> D64698D364A3B171
>
> SQL> connect x/old_password
> Connected.
> SQL> alter user x identified by new_password ;
>
> User altered.
>
> SQL> connect x/new_password
> Connected.
> SQL> alter user x identified by values 'D64698D364A3B171' ;
>
> User altered.
>
> SQL> connect x/old_password
> Connected.
> SQL>
>
> > TIA ...
> >
> > --
> > Regards,
> > Stefan Jahnke
> > --
> > Please see the official ORACLE-L FAQ: http://www.orafaq.com
>
> <http://www.orafaq.com>
>
> > --
> > Author: Stefan Jahnke
> > INET: stefan.jahnke_at_d2vodafone.de
> >
> > Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> > San Diego, California -- Public Internet access / Mailing Lists
> >
> > --------------------------------------------------------------------
> > To REMOVE yourself from this mailing list, send an E-Mail message
> > to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> > the message BODY, include a line containing: UNSUB ORACLE-L
> > (or the name of mailing list you want to be removed from). You may
> > also send the HELP command for other information (like subscribing).


Content-Type: text/html; charset="iso-8859-1"; name="Attachment: 1"
Content-Transfer-Encoding: quoted-printable
Content-Description: 
----------------------------------------

-- 
Rodd Holman
Oracle DBA
(605) 988-1373
rodney.holman_at_lodgenet.com
Comments made are my own opinions and views. They do not represent views, 
policies, or procedures of LodgeNet Entertainment Corporation


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Rodd Holman
  INET: rodney.holman_at_lodgenet.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Tue Apr 03 2001 - 16:03:45 CDT

Original text of this message

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