ORA-28001: the password has expired

Cause:

You try to connect to the database with the credentials where password is expired

SQL> conn test
Enter password:
ERROR:
ORA-28001: the password has expired

Workaround:

Check the old password hexadecimal encrypted value from sys.user$ view to reset the user with same password

SQL> col NAME format a20
SQL> col PASSWORD format a20
SQL> select name,PASSWORD from sys.user$ where name='TEST';

NAME                 PASSWORD
-------------------- --------------------
TEST                 483A017BEDCEEDA0

Check if the account is locked and password expiry date

SQL> col USERNAME format a20
SQL> col PASSWORD format a20
SQL> col ACCOUNT_STATUS format a20
SQL> col LOCK_DATE format a20
SQL> select USERNAME,PASSWORD,ACCOUNT_STATUS,LOCK_DATE,EXPIRY_DATE from dba_users where username='TEST';

USERNAME             PASSWORD             ACCOUNT_STATUS       LOCK_DATE            EXPIRY_DA
-------------------- -------------------- -------------------- -------------------- ---------
TEST                                      OPEN                                      16-DEC-21

Reset the password

SQL> alter user test identified by values '483A017BEDCEEDA0' account unlock;

User altered.

Check the connection

SQL> conn test
Enter password:
Connected.

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 )

Google photo

You are commenting using your Google 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