How to Fix ORA-28002 The Password Will Expire in 7 Days Errors

Database User Profiles

When you create a database user it has a profile. Which, by default, is the “DEFAULT” profile. This defines many things. Such as CPU, I/O and memory limits (though we recommend you use the Database Resource Manager for these instead).

And the password policy.

Which expires passwords every 180 days.

To stop this and allow users to keep their password forever, alter the profile like so:

alter profile "DEFAULT" limit 
  password_life_time unlimited;

Or create a new policy and assign that to your users:

create profile unlimited_pwd_prof limit
  password_life_time unlimited;
 
alter user <username> profile unlimited_pwd_prof;

Once you’ve done this you may think everything’s good. So you’re surprised when you login again and still hit the ORA-28002 error.

Or, if enough time has elapsed, you now see ORA-28001:

What’s going on here?

The problem is you’ve entered the grace period. This starts after password_life_time days have elapsed since the last password change. By default it runs for seven days. If you want to increase this time to say, two weeks, run:

alter profile unlimited_pwd_prof limit  
  password_grace_time 14;

During this time you can still login, but will get “the password will expire” warnings. After the number of days defined in the password_grace_time have passed, the password expires.

The only way out of either situation is to reset the password!

To do so, run:

alter user <username> identified by <password>;

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *

Enter Captcha Here : *

Reload Image