Lab-verifiedReproduced and fixed on Oracle AI Database 26ai Free 23.26.3.0.0 · 2026-11-29 · container image gvenzl/oracle-free:23-slim
ORA-28001 appears at login when the account status is EXPIRED. Older releases print the password has expired; Oracle 23ai prints The account has expired. The password must be changed. The cause is the same.
Two things put an account in that state: a DBA ran ALTER USER ... PASSWORD EXPIRE, or the password reached the PASSWORD_LIFE_TIME of the user's profile (DEFAULT is 180 days unless changed) and the grace time was used up. Both are reproduced below. In both cases SQL*Plus then asked for a new password; the run had no input, so it ended with ORA-00988 and Password unchanged.
The fix: check ACCOUNT_STATUS in DBA_USERS, set a password with ALTER USER ... IDENTIFIED BY, and if the profile is the reason, change its limit so it does not expire again.
01A DBA ran ALTER USER ... PASSWORD EXPIRE
After ALTER USER lab_a PASSWORD EXPIRE, CONNECT lab_a/lab failed with ORA-28001 and SQL*Plus prompted Changing password for lab_a.
DBA_USERS showed ACCOUNT_STATUS EXPIRED. After ALTER USER lab_a IDENTIFIED BY lab the login worked and SELECT user FROM dual returned LAB_A.
Setup
ALTER USER lab_a PASSWORD EXPIRE;User altered.CONNECT lab_a/lab@//localhost/FREEPDB1ERROR:
ORA-28001: The account has expired. The password must be changed.
Help: https://docs.oracle.com/error-help/db/ora-28001/
Changing password for lab_a
New password:
Retype new password:
ERROR:
ORA-00988: missing or invalid passwords
Help: https://docs.oracle.com/error-help/db/ora-00988/
Password unchanged
Warning: You are no longer connected to ORACLE.COLUMN account_status FORMAT A16
SELECT username, account_status FROM dba_users WHERE username = 'LAB_A';USERNAME ACCOUNT_STATUS
------------------------------ ----------------
LAB_A EXPIRED
1 row selected.ALTER USER lab_a IDENTIFIED BY lab;User altered.CONNECT lab_a/lab@//localhost/FREEPDB1
COLUMN login_user FORMAT A12
SELECT user AS login_user FROM dual;LOGIN_USER
------------
LAB_A
1 row selected.02Profile PASSWORD_LIFE_TIME ran out with no grace time
The user was given a profile with PASSWORD_LIFE_TIME 1/86400 (1 second, to make it expire quickly) and PASSWORD_GRACE_TIME 0. Three seconds later the login failed with ORA-28001.
DBA_USERS showed EXPIRED with profile PWD_PROFILE. ALTER PROFILE pwd_profile LIMIT PASSWORD_LIFE_TIME UNLIMITED stopped further expiry, but the account stayed expired until ALTER USER lab_a IDENTIFIED BY lab. After that the login worked.
Setup
BEGIN
FOR p IN (SELECT DISTINCT profile FROM dba_profiles WHERE profile = 'PWD_PROFILE') LOOP
EXECUTE IMMEDIATE 'DROP PROFILE pwd_profile CASCADE';
END LOOP;
END;
/
CREATE PROFILE pwd_profile LIMIT PASSWORD_LIFE_TIME 1/86400 PASSWORD_GRACE_TIME 0;
ALTER USER lab_a PROFILE pwd_profile;
EXEC DBMS_SESSION.SLEEP(3)PL/SQL procedure successfully completed.
Profile created.
User altered.
PL/SQL procedure successfully completed.CONNECT lab_a/lab@//localhost/FREEPDB1ERROR:
ORA-28001: The account has expired. The password must be changed.
Help: https://docs.oracle.com/error-help/db/ora-28001/
Changing password for lab_a
New password:
Retype new password:
ERROR:
ORA-00988: missing or invalid passwords
Help: https://docs.oracle.com/error-help/db/ora-00988/
Password unchanged
Warning: You are no longer connected to ORACLE.COLUMN account_status FORMAT A16
COLUMN profile FORMAT A12
SELECT username, account_status, profile FROM dba_users WHERE username = 'LAB_A';
COLUMN limit FORMAT A10
SELECT resource_name, limit FROM dba_profiles WHERE profile = 'PWD_PROFILE' AND resource_name IN ('PASSWORD_LIFE_TIME', 'PASSWORD_GRACE_TIME') ORDER BY resource_name;USERNAME ACCOUNT_STATUS PROFILE
------------------------------ ---------------- ------------
LAB_A EXPIRED PWD_PROFILE
1 row selected.
RESOURCE_NAME LIMIT
-------------------------------- ----------
PASSWORD_GRACE_TIME 0
PASSWORD_LIFE_TIME 0
2 rows selected.ALTER PROFILE pwd_profile LIMIT PASSWORD_LIFE_TIME UNLIMITED;
ALTER USER lab_a IDENTIFIED BY lab;Profile altered.
User altered.Changing the profile alone does not unlock an already expired account; the password must also be set.
CONNECT lab_a/lab@//localhost/FREEPDB1
COLUMN login_user FORMAT A12
SELECT user AS login_user FROM dual;LOGIN_USER
------------
LAB_A
1 row selected.FAQ
How do I fix ORA-28001 the password has expired?
Log in as a DBA and run ALTER USER <user> IDENTIFIED BY <password>. That clears the EXPIRED status.
How do I stop passwords from expiring?
Change the profile the user uses: ALTER PROFILE <profile> LIMIT PASSWORD_LIFE_TIME UNLIMITED. Check which profile it is in DBA_USERS.PROFILE.
Why does 23ai say 'The account has expired'?
23ai changed the wording of ORA-28001. It is the same error as 'the password has expired' in older versions; the account status is EXPIRED either way.
What is the difference from ORA-28000?
ORA-28000 means the account is locked (status LOCKED). ORA-28001 means the password is expired (status EXPIRED). Check ACCOUNT_STATUS in DBA_USERS.
How we verify
Each scenario starts from fresh database users. A script runs the setup, confirms the exact error code, applies the fix and runs the statement again. The output shown is what the database printed, saved by the script.
lab_a and lab_b are ordinary users created for the test; system is the DBA account. Oracle AI Database 26ai Free Release 23.26.3.0.0 - Develop, Learn, and Run for Free 23.26.3.0.0