Another interesting, undocumented command syntax is the "alter user ... using values ..."
To temporarily change a user's password then set it back, take a note of the PASSWORD field in DBA_USERS. Change the password and then set it back to what it was:
SQL> select username, password from dba_users where username='BUBBA';
USERNAME PASSWORD
------------------------------ ------------------------------
BUBBA 3104BC5BB78B55BE
SQL> alter user bubba identified by bubba;
User altered.
SQL> conn bubba/bubba
Connected.
SQL> conn / as sysdba
Connected.
SQL> select username, password from dba_users where username='BUBBA';
USERNAME PASSWORD
------------------------------ ------------------------------
BUBBA 7D2D7383FC9288B7
SQL> alter user bubba identified by values '3104BC5BB78B55BE';
User altered.
SQL> select username, password from dba_users where username='BUBBA';
USERNAME PASSWORD
------------------------------ ------------------------------
BUBBA 3104BC5BB78B55BE
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment