Re: Passwords in DBA_USERS (Oracle 12c)

From: Cherif Ben Henda <cherif.benhenda_at_gmail.com>
Date: Fri, 8 Jul 2016 11:32:47 +0100
Message-ID: <CANH7Qp8T_4b6Xt4mL9+v80ig=rnS-xcVVX9Bknx6DaGamGSA7w_at_mail.gmail.com>



Hi ,
Password column on dba_users is not the same as sys.user$

DECODE(sys.user$."PASSWORD",'GLOBAL',
sys.user$."PASSWORD",'EXTERNAL',sys.user$."PASSWORD",*NULL*) "PASSWORD" This may be help you.

Thanks,

2016-07-07 0:40 GMT+01:00 Mladen Gogala <gogala.mladen_at_gmail.com>:

> I've hit a rather unpleasant snag: I needed to change a password for a
> user and make sure that I can return it back to what it was. The usual
> method is by extracting the password from DBA_USERS and then use "VALUES"
> clause to return it back. However, query to DBA_USERS did not return
> password. I checked it later at home and here is what happens:
> Connected to:
> Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit
> Production
> With the Partitioning, OLAP, Advanced Analytics and Real Application
> Testing options
>
>
> Session altered.
>
> Elapsed: 00:00:00.00
> SQL> select password from dba_users where username='SCOTT';
>
> PASSWORD
>
> --------------------------------------------------------------------------------
>
>
> Elapsed: 00:00:00.00
> SQL> select password from sys.user$ where name='SCOTT';
>
> PASSWORD
>
> --------------------------------------------------------------------------------
> F894844C34402B67
>
> Elapsed: 00:00:00.01
> SQL> alter user scott identified by values 'F894844C34402B67';
>
> User altered.
>
> Elapsed: 00:00:00.10
> SQL> connect scott/tiger_at_local
> Connected.
>
> Session altered.
>
> Elapsed: 00:00:00.00
> SQL>
>
> I was connected as SYSDBA, so there is no doubt about not having enough
> privileges. Moreover, querying directly the table USER$ provided the right
> password. Is this on purpose or a bug? I have also checked with 11.2.0.4,
> the same thing happens. I am not terribly upset because I can always go
> directly to the USER$ table, but this is annoying, since prevents me from
> doing this when not connected as SYSDBA, On the other hand, changing
> password back using the "VALUES" clause is a very usual thing, somebody
> must have noticed. Googling around, I found the page from Laurent
> Schneider:
>
>
> http://laurentschneider.com/wordpress/2007/08/the-password-is-not-longer-displayed-in-dba_userspassword.html
>
> which states more or less the same thing. However, the change isn't
> documented as Laurent has stated. What is the purpose of the PASSWORD
> column in DBA_USERS view, if the password will not be shown?
>
>
> --
> Mladen Gogala
> Oracle DBA
> Tel: (347) 321-1217
>
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>

-- 
Cordialement,
Cherif Ben Henda

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Jul 08 2016 - 12:32:47 CEST

Original text of this message