Tuesday, September 02, 2008

Get out of ORA-28002: the password will expire within n days

Today, a colleage meet this ORA-28002 when starting Content Server. It's a bit annoying.
So try to find the way to get out of this error.

This post does great to explain the problem. While even followed its solution B, the ORA-28002 remains there.
Then from Metalink note 162818.1, "ORA-28002 On User Connection Immediately After PASSWORD_LIFE_TIME Changed", it is known that "Accounts that have entered their grace
period will have to change their passwords.", even though the PASSWORD_LIFE_TIME is set back to unlimited.
Final workaround is altering user's password to the previous one. It doesn't change password, but bypass the annoying password life management.

Steps to record:
1. check out the password limits set to the user.
SQL> select LIMIT, RESOURCE_NAME from dba_profiles where RESOURCE_NAME in 'PASSWORD_GRACE_TIME','PASSWORD_LIFE_TIME','PASSWORD_REUSE_MAX','PASSWORD_REUSE_TIME') and PROFILE=(select profile from dba_users where username=);

2. check out the profile of the user.
SQL> select profile from dba_users where username=;

3. alter the profile, set the limits to unlimited.
SQL> alter profile limit PASSWORD_LIFE_TIME UNLIMITED;
SQL> alter profile limit PASSWORD_GRACE_TIME UNLIMITED;

4. if the user has entered the grace period (ORA-28002 when login), the password has to be altered. Fortunately you need not really change it.
SQL> alter user identified by ;

That's all.

No comments: