ChatGPT解决这个技术问题 Extra ChatGPT

ORA-28001: The password has expired

I'm facing the problem about my database in Oracle, When I opened my database, it appear a message with: "ORA-28001: The password has expired"

I have updated my account with somes:

sqlplus /nolog
SQL> connect / as SYSDBA
Connected.

SQL> SELECT username, account_status FROM dba_users WHERE ACCOUNT_STATUS LIKE '%EXPIRED%';

SQL> ALTER USER system IDENTIFIED BY system;         
User altered.

SQL> ALTER USER system ACCOUNT UNLOCK;
User altered.

SQL> ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
Profile altered.

SQL> exit

I check and see that, my account: 'system' has OPEN, but I open it on Oracle SQL Developer, it still have alert:

ORA-28001: The password has expired

I have refered very much links but it still same the problem, how to fix this?

Does it prompt you to enter new password? or Go to SQL*PLUS and try to login it will prompt you to enter new password. OR right click on the the connection name and you will see Reset Password on context menu. Or use alter user username identified by newpassword replace oldpassword.
In SQL developer, Reset Password was disable, I use prompt: alter user username identified by newpassword replace oldpassword, however it's same error :(
It's seem I can not connected to db
Have you tried to use SQL*PLUS? Otherwise if the Reset Password is disabled then go to here.thatjeffsmith.com/archive/2012/11/…
Is system your original password for SYSTEM user?

O
OmG
ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
alter user EPUSR100 identified by EPUSR100 account unlock;
commit;

g
giannis christofakis

I have fixed the problem, just need to check:

open_mode from v$database

and then check:

check account_status to get mode information

and then use:

alter user myuser identified by mynewpassword account unlock;

I only used "alter user" and it worked. What are the first two statements for?
m
mahesh kumar thiruveedula

Try to connect with the users in SQL Plus, whose password has expired. it will prompt for the new password. Enter the new password and confirm password.

It will work

SQL Plus output image


D
Dhaval Simaria

Check "PASSWORD_LIFE_TIME" by

Sql > select * from dba_profiles;

Set to Never expire

Sql> ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;

Then reset the password of locked user.


I have tried to reset with: alter user system identified by new_password account unlock; , but same error
T
Taravat
C:\>sqlplus /nolog
SQL> connect / as SYSDBA
SQL> select * from dba_profiles;
SQL> alter profile default limit password_life_time unlimited;
SQL> alter user database_name identified by new_password;
SQL> commit;
SQL> exit;

For system user; you need to re-set your password with: "alter user system identified by newpa$$word;"
H
Harisudha

Connect to Oracle

https://i.stack.imgur.com/C6m75.png

Check the status and expiry date for the user

SELECT username, account_status, expiry_date FROM dba_users;

https://i.stack.imgur.com/cdKH1.png

Change the password for the user to resolve expiry

ALTER USER dummy_user IDENTIFIED BY dummy_password;

https://i.stack.imgur.com/GvT9B.png

Unlock the user account if it locked

ALTER USER dummy_user ACCOUNT UNLOCK;

Set the password expiry limit to unlimited to avoid issue in the future

ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;

https://i.stack.imgur.com/S2oj9.png

Again check the status of the user to verify the expiry date. The account status is now open and the expiry date is unlimited.

SELECT username, account_status, expiry_date FROM dba_users;

https://i.stack.imgur.com/jlJNw.png

SQL commands:

sqlplus sys/root as sysdba

SELECT username, account_status, expiry_date FROM dba_users;

ALTER USER dummy_user IDENTIFIED BY dummy_password;

ALTER USER dummy_user ACCOUNT UNLOCK;

ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;


S
Shweta

I had same problem even after changing the password, it wasn't getting reflected in SQLDEVELOPER.

Atlast following solved my problem :

Open Command Propmt Type sqlplus login as sysdba Run following command : alter user USERNAME identified by NEW_PASSWORD;


k
keertijava

I had same problem, i am trying to login database it appear a message with: "ORA-28001: The password has expired" , I have fixed the problem simple steps

1.open command prompt 2.type sqlplus 3.It will ask Enter Password, you can give old password, it will show password has expired ORA-28001 4.It will ask new password and retype password 5.It will change with new password 6.Go to the sql database and try to connect with new password, it will connect.


S
Sarath

To know which users are expired, run command SELECT * FROM ;

To unlock users, run command alter user identified by account unlock;


M
Manngo

I am running Oracle 18c in a Docker container, where the problematic database is a Pluggable database, so I had to take a different approach:

Log in to SYSDBA Switch to Pluggagle Database ALTER SESSION SET CONTAINER=XEPDB2; Remove Password Expiry ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED; Get Current User Details SELECT dbms_metadata.get_ddl('USER','username') stmt from dual; Replace the username above with your own. The output will be something like: CREATE USER "…" IDENTIFIED BY VALUES '…' To reset the password, run as: ALTER USER "…" IDENTIFIED BY VALUES '…' ACCOUNT UNLOCK; … using the username and password from the previous step.

This is a combination of other answers here and elsewhere.


N
Nataraj Babu C

Simple.. Goto Command prompt and type SQLPLUS /@connect string Hit Enter.

It says password expired and provide the option to enter new password. Enter new password and you are done.


There are other answers (and a accepted one) that provide the OP's question, and they were posted some time ago. When posting an answer see: How do I write a good answer?, please make sure you add either a new solution, or a substantially better explanation, especially when answering older questions.
A
Akshay Kumar Sharma

Just go to the machine where your database resides, search windows -> search SqlPlus Type the user name, then type password, it will prompt you to give new password. On providing new password, it will say successfully changed the password.


u
user3380585

you are in wrong cdb/pdb so connect to right pdb


关注公众号,不定期副业成功案例分享
Follow WeChat

Success story sharing

Want to stay one step ahead of the latest teleworks?

Subscribe Now