Sunday , December 22 2024

ORA-28001: the password has expired

 

When the user password expires, we get the error “ORA-28001: the password has expired“.

The expiration date of the user’s password is defined in the profile used by the user.

You can find the details in the article titled “How To Create Oracle Profiles“.

To remove the expire of the user, we are connecting to the database via TOAD, and as you can see in the following screen shot, we select the Users tab on the left.

Expired user appears with the x sign as shown below.

We click on this user and we take the script on the right and edit it as follows.

 

In Oracle 12C, we can not do this in this way.

To get the user script in Oracle12c, you can read the article titled “How To Get User’s Password With Hash On Oracle 12c“.

 

When you run this script, you may get an error like the following.

ORA-28007: the password cannot be reused

 

The reason you get this error is the PASSWORD_REUSE_MAX parameter, which is defined in the profile used by the user.

You can see the user’s profile in the user’s create script.

We select Profiles from the tab on the left side as below and click on Script in the right side.

We copy the resulting script and paste it on a query screen in the Editor.

We delete the line that passed the DROP phrase. And we change the CREATE expression to ALTER.

We change the PASSWORD_REUSE_MAX parameter to UNLIMITED and run the script.

 

As I mentioned above, after modifying the profile used by the user, we run the script I mentioned at the beginning of the article to “alter” the user.

Finally, remember to alter the profile to its original state.

In the script that starts with “ALTER PROFILE”, you must run the script again by reversing the PASSWORD_REUSE_MAX parameter to its previous state.

Loading

About dbtut

We are a team with over 10 years of database management and BI experience. Our Expertises: Oracle, SQL Server, PostgreSQL, MySQL, MongoDB, Elasticsearch, Kibana, Grafana.

Leave a Reply

Your email address will not be published. Required fields are marked *