Issue :
To Reset the same same password to the user which it was using before password expiry
ORA-28001: the password has expired
The users password were expired and in their grace period.
Here is what it looked like:
USERNAME ACCOUNT_STATUS EXPIRY_DA
------------------------- -------------------------------- ---------
SYS OPEN 09-JUN-19
DBSNMP OPEN 02-OCT-20
SCOTT EXPIRED(GRACE) 08-MAY-20
ORACLE_OCM EXPIRED & LOCKED 20-NOV-16
XS$NULL EXPIRED & LOCKED 20-NOV-16
MDDATA EXPIRED & LOCKED 20-NOV-16
DIP EXPIRED & LOCKED 20-NOV-16
SYSTEM EXPIRED 15-JAN-20
AUDSYS EXPIRED & LOCKED 20-NOV-16
OUTLN EXPIRED & LOCKED 20-NOV-16
SQL> select password from sys.user$ where name='SCOTT';
PASSWORD
--------------------------------------------------------------------------------
C4220213B4301FEF
This will give me the hashed password for the user SCOTT
Now set the same password Hash for user SCOTT:
SQL> alter user SCOTT identified by values 'C4220213B4301FEF';
SQL> select username,account_status,expiry_date from dba_users;
USERNAME ACCOUNT_STATUS EXPIRY_DA
------------------------- -------------------------------- ---------
SYS OPEN 09-JUN-19
DBSNMP OPEN 02-OCT-20
SCOTT OPEN 05-DEC-20
ORACLE_OCM EXPIRED & LOCKED 20-NOV-16
XS$NULL EXPIRED & LOCKED 20-NOV-16
MDDATA EXPIRED & LOCKED 20-NOV-16
DIP EXPIRED & LOCKED 20-NOV-16
SYSTEM EXPIRED 15-JAN-20
AUDSYS EXPIRED & LOCKED 20-NOV-16
OUTLN EXPIRED & LOCKED 20-NOV-16
incase you dont need the old password need to reset a new password , Follow below setps
Option 1 :
SQL> password SCOTT
Changing password for SCOTT
New password:
Retype new password:
Password changed
Option 2 :
alter user SCOTT identified by <New Password>;
ConversionConversion EmoticonEmoticon