Return-Path: <oracle-l-bounce@freelists.org>
X-Original-To: oracle-l@orafaq.com
Delivered-To: oracle-l@orafaq.com
Received: from puck1183.startdedicated.com (localhost [127.0.0.1])
 by puck1183.startdedicated.com (Postfix) with ESMTP id A9EDC196126A
 for <oracle-l@orafaq.com>; Thu,  7 Jul 2016 01:52:05 +0200 (CEST)
Received: from turing.freelists.org (turing.freelists.org [206.53.239.180])
 by puck1183.startdedicated.com (Postfix) with ESMTPS
 for <oracle-l@orafaq.com>; Thu,  7 Jul 2016 01:52:05 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 36F5324BA2;
 Wed,  6 Jul 2016 19:52:00 -0400 (EDT)
X-Virus-Scanned: Debian amavisd-new at turing.freelists.org
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id UoThCd20yVdW; Wed,  6 Jul 2016 19:52:00 -0400 (EDT)
Received: from turing.freelists.org (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 5C01224C09;
 Wed,  6 Jul 2016 19:51:47 -0400 (EDT)
Received: with ECARTIS (v1.0.0; list oracle-l); Wed, 06 Jul 2016 19:50:25 -0400 (EDT)
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 6834E24A90
 for <oracle-l@freelists.org>; Wed,  6 Jul 2016 19:50:25 -0400 (EDT)
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id iewVS26OKBqr for <oracle-l@freelists.org>;
 Wed,  6 Jul 2016 19:50:25 -0400 (EDT)
Received: from mail-qt0-f174.google.com (mail-qt0-f174.google.com [209.85.216.174])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (No client certificate requested)
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 3125723D60
 for <oracle-l@freelists.org>; Wed,  6 Jul 2016 19:50:25 -0400 (EDT)
Received: by mail-qt0-f174.google.com with SMTP id w59so966515qtd.3
        for <oracle-l@freelists.org>; Wed, 06 Jul 2016 16:50:25 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:in-reply-to:references:from:date
         :message-id:subject:to:cc;
        bh=SpjnAJ5Ad20OvOgt8BjMLhasNsgWPx2PD8ClC0GGoe0=;
        b=IlTZjJZPRugCPZQ5TM9qLseekgbKORAwwLuj0N/5LLSNp9xKOVnJLftMEan7yp4iC8
         crM7VYPYESeSjmU2GeCm24ni/COIoiT4k+hKs3kaZLaN6BSbLIJxhjRnaqulFRACsNct
         oKhR4stC494XqUwCQV2P8hYR8O/hhyBfSRhKip+yCQsJk855iYYF5qIfCHLt1CfsEPtE
         hf80AeqWTixgOZawDOWc7U/3wBdrctNw18j8TQaEk85IAo/xTNhPjp5pAxq+ocdVBs3Y
         gHlrWZWEGrTa4Vko1BZ2EixR79ZeWX25MmE9u+tqI+drhqKOozTsSuTktMTIDHQDOy9R
         ZsGA==
X-Gm-Message-State: ALyK8tIY/Uy+d07VdNA6pGJh4iKBOujCI6ZpEkGC8Z7R3vYidYVgzTk+U8MD+s8xg0qU5z1ORaZxnBIM+fWRIA==
X-Received: by 10.200.37.150 with SMTP id e22mr39830898qte.37.1467849024655;
 Wed, 06 Jul 2016 16:50:24 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.237.46.135 with HTTP; Wed, 6 Jul 2016 16:50:24 -0700 (PDT)
In-Reply-To: <577D96E8.60502@gmail.com>
References: <577D96E8.60502@gmail.com>
From: Ricardo Arnoud <ricardoskn@gmail.com>
Date: Wed, 6 Jul 2016 20:50:24 -0300
Message-ID: <CAC540oiLsoSZ+26yqv0ecmFq8P__4+NbGQUPjQgLqGqjZPkEGQ@mail.gmail.com>
Subject: Re: Passwords in DBA_USERS (Oracle 12c)
To: gogala.mladen@gmail.com
Cc: oracle-l <oracle-l@freelists.org>
Content-Type: multipart/alternative; boundary=001a11c04ca8b2d6770537003b0f
X-archive-position: 65459
X-ecartis-version: Ecartis v1.0.0
Sender: oracle-l-bounce@freelists.org
Errors-to: oracle-l-bounce@freelists.org
X-original-sender: ricardoskn@gmail.com
Precedence: normal
Reply-To: ricardoskn@gmail.com
List-help: <mailto:ecartis@freelists.org?Subject=help>
List-unsubscribe: <oracle-l-request@freelists.org?Subject=unsubscribe>
List-software: Ecartis version 1.0.0
List-Id: oracle-l <oracle-l.freelists.org>
X-List-ID: oracle-l <oracle-l.freelists.org>
List-subscribe: <oracle-l-request@freelists.org?Subject=subscribe>
List-owner: <mailto:mark.bobak@proquest.com>
List-post: <mailto:oracle-l@freelists.org>
List-archive: <http://www.freelists.org/archives/oracle-l>
X-list: oracle-l
--001a11c04ca8b2d6770537003b0f
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Try the following for 12c:

select 'ALTER USER '||name||' identified by values
'||CHR(39)||spare4||';'||password||CHR(39)||';'
 from user$ where name in ('SCOTT');

On Wed, Jul 6, 2016 at 8:40 PM, Mladen Gogala <gogala.mladen@gmail.com>
wrote:

> 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=3D'SCOTT';
>
> PASSWORD
>
> -------------------------------------------------------------------------=
-------
>
>
> Elapsed: 00:00:00.00
> SQL> select password from sys.user$ where name=3D'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@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 righ=
t
> 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
>
>
>


--=20
--
Thanks,
* Ricardo Arnoud*

*Bacharel em Ci=C3=AAncia da Computa=C3=A7=C3=A3o* - 2013/1





(51) 9511-4658 VIVO / (51) 9259-2333 CLARO / Porto Alegre - RS
http://www.ricardoarnoud.com
http://www.alterdatabaseopen.com
FB http://www.facebook.com/ricardo.arnoud
Linkedin http://br.linkedin.com/pub/ricardo-arnoud/15/127/3b1

--001a11c04ca8b2d6770537003b0f
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Try the following for 12c:<br><br>select &#39;ALTER USER &=
#39;||name||&#39; identified by values &#39;||CHR(39)||spare4||&#39;;&#39;|=
|password||CHR(39)||&#39;;&#39;<br>=C2=A0from user$ where name in (&#39;SCO=
TT&#39;);<br></div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote=
">On Wed, Jul 6, 2016 at 8:40 PM, Mladen Gogala <span dir=3D"ltr">&lt;<a hr=
ef=3D"mailto:gogala.mladen@gmail.com" target=3D"_blank">gogala.mladen@gmail=
.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"ma=
rgin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I&#39;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 extra=
cting the password from DBA_USERS and then use &quot;VALUES&quot; clause to=
 return it back. However, query to DBA_USERS did not return password. I che=
cked it later at home and here is what happens:<br>
Connected to:<br>
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Productio=
n<br>
With the Partitioning, OLAP, Advanced Analytics and Real Application Testin=
g options<br>
<br>
<br>
Session altered.<br>
<br>
Elapsed: 00:00:00.00<br>
SQL&gt; select password from dba_users where username=3D&#39;SCOTT&#39;;<br=
>
<br>
PASSWORD<br>
---------------------------------------------------------------------------=
-----<br>
<br>
<br>
Elapsed: 00:00:00.00<br>
SQL&gt; select password from sys.user$ where name=3D&#39;SCOTT&#39;;<br>
<br>
PASSWORD<br>
---------------------------------------------------------------------------=
-----<br>
F894844C34402B67<br>
<br>
Elapsed: 00:00:00.01<br>
SQL&gt; alter user scott identified by values &#39;F894844C34402B67&#39;;<b=
r>
<br>
User altered.<br>
<br>
Elapsed: 00:00:00.10<br>
SQL&gt; connect scott/tiger@local<br>
Connected.<br>
<br>
Session altered.<br>
<br>
Elapsed: 00:00:00.00<br>
SQL&gt;<br>
<br>
I was connected as SYSDBA, so there is no doubt about not having enough pri=
vileges. Moreover, querying directly the table USER$ provided the right pas=
sword.=C2=A0 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 d=
irectly to the USER$ table, but this is annoying, since prevents me from do=
ing this when not connected as=C2=A0 SYSDBA, On the other hand, changing pa=
ssword back using the &quot;VALUES&quot; clause is a very usual thing, some=
body must have noticed.=C2=A0 Googling around, I found the page from Lauren=
t Schneider:<br>
<br>
<a href=3D"http://laurentschneider.com/wordpress/2007/08/the-password-is-no=
t-longer-displayed-in-dba_userspassword.html" rel=3D"noreferrer" target=3D"=
_blank">http://laurentschneider.com/wordpress/2007/08/the-password-is-not-l=
onger-displayed-in-dba_userspassword.html</a><br>
<br>
which states more or less the same thing. However, the change isn&#39;t doc=
umented as Laurent has stated. What is the purpose of the PASSWORD column i=
n DBA_USERS view, if the password will not be shown?<span class=3D"HOEnZb">=
<font color=3D"#888888"><br>
<br>
<br>
-- <br>
Mladen Gogala<br>
Oracle DBA<br>
Tel: <a href=3D"tel:%28347%29%20321-1217" value=3D"+13473211217" target=3D"=
_blank">(347) 321-1217</a><br>
<br>
--<br>
<a href=3D"http://www.freelists.org/webpage/oracle-l" rel=3D"noreferrer" ta=
rget=3D"_blank">http://www.freelists.org/webpage/oracle-l</a><br>
<br>
<br>
</font></span></blockquote></div><br><br clear=3D"all"><br>-- <br><div clas=
s=3D"gmail_signature" data-smartmail=3D"gmail_signature"><div dir=3D"ltr"><=
div><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir=3D"ltr"><div>

--<br>





<font size=3D"4">Thanks,<b><br>




Ricardo Arnoud</b></font><br></div><div><br></div><i>Bacharel em Ci=C3=AAnc=
ia da Computa=C3=A7=C3=A3o</i> - 2013/1<br><br><img src=3D"http://www.alter=
databaseopen.com/certview/ocs_ocp_12c.png" height=3D"67" width=3D"420"><br>=
<div>




<br><img src=3D"http://t3.gstatic.com/images?q=3Dtbn:ANd9GcT0Ecf82fSufcHNuJ=
jBbZY5x1zjIJNEFTr0dIQ9oa9H6Oj7w3u3" height=3D"96" width=3D"96">=C2=A0 <img =
src=3D"http://www.ricardoarnoud.com/images/mcp.jpg" height=3D"116" width=3D=
"200"><br><br>(51) 9511-4658 VIVO / (51) 9259-2333 CLARO / Porto Alegre - R=
S<br></div><div>


<a href=3D"http://www.ricardoarnoud.com" target=3D"_blank">http://www.ricar=
doarnoud.com</a><br><a href=3D"http://www.alterdatabaseopen.com" target=3D"=
_blank">http://www.alterdatabaseopen.com</a><br>
FB <a href=3D"http://www.facebook.com/ricardo.arnoud" target=3D"_blank">htt=
p://www.facebook.com/ricardo.arnoud</a><span style=3D"padding-right:16px;wi=
dth:16px;height:16px"></span><br>Linkedin <a href=3D"http://br.linkedin.com=
/pub/ricardo-arnoud/15/127/3b1" target=3D"_blank">http://br.linkedin.com/pu=
b/ricardo-arnoud/15/127/3b1</a></div></div></div></div></div></div></div></=
div></div>
</div>

--001a11c04ca8b2d6770537003b0f--
--
http://www.freelists.org/webpage/oracle-l


