ORA-28002 : the password will expire within 3 days

User password can be restored back to its original one by using password hash value.

The password is unknown, and it is encrypted in application configurations. User doesn’t want to change it at the moment.

$ oerr ora 28002
28002, 00000, "the password will expire within %s days"
// *Cause: The user's account is about to expire and the password
// needs to be changed
// *Action: change the password or contact the DBA
//

SQL> select USERNAME,PASSWORD,ACCOUNT_STATUS,EXPIRY_DATE 
       from dba_users 
      where username='TESTUSER';

USERNAME         PASSWORD             ACCOUNT_STATUS    EXPIRY_DATE
---------------- -------------------- ----------------  ---------
TESTUSER                              EXPIRED(GRACE)    18-MAR-17

Get hash password value from USER$.

SQL> select password from user$ where name='TESTUSER';

PASSWORD
--------------------
512795B1F6AC27B8

Reset the password with the original one:

SQL> alter user testuser identified by values '512795B1F6AC27B8';

User altered.
SQL> select USERNAME,ACCOUNT_STATUS,EXPIRY_DATE 
       from dba_users 
      where USERNAME='TESTUSER';

USERNAME       ACCOUNT_STATUS    EXPIRY_DATE
-------------- ---------------   -----------
TESTUSER       OPEN              14-MAY-17

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: