ORA-28002: the password will expire within 7 days

ORA-28002: the password will expire within 7 days
Cause: The user’s account is about to about to expire and the password needs
to be changed.
Action: Change the password or contact the database administrator.

Reference: Oracle Documentation
[roboshot url=”https://blogs.silicontechnix.com/?p=945″ width=”80″ newpage=”TRUE”]
Solutions:

1) Simply change the password to avoid it temporary

01[oracle@db ~]$ sqlplus scott/tiger
02 
03SQL*Plus: Release 11.2.0.1.0 Production on Wed Jun 20 14:08:01 2012
04 
05Copyright (c) 1982, 2009, Oracle. All rights reserved.
06 
07ERROR:
08ORA-28002: the password will expire within 7 days
09 
10Connected to:
11Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
12 
13SQL> PASSWORD
14Changing password for SCOTT
15Old password:
16New password:
17Retype new password:
18Password changed

2) Set PASSWORD_LIFE_TIME of the profile assigned user to UNLIMITED
then change the password to avoid it permanently

01[oracle@db ~]$ sqlplus scott/tiger
02 
03SQL*Plus: Release 11.2.0.1.0 Production on Wed Jun 20 14:08:01 2012
04 
05Copyright (c) 1982, 2009, Oracle. All rights reserved.
06 
07ERROR:
08ORA-28002: the password will expire within 7 days
09 
10Connected to:
11Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
12 
13SQL> connect / as sysdba
14Connected.
15 
16SQL> SELECT PROFILE FROM dba_users WHERE username = 'SCOTT';
17 
18PROFILE
19------------------------------
20DEFAULT
21 
22SQL> SELECT LIMIT FROM DBA_PROFILES WHERE PROFILE='DEFAULT'
23AND RESOURCE_NAME='PASSWORD_LIFE_TIME';
24 
25LIMIT
26----------------------------------------
2760
28 
29SQL> ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
30 
31Profile altered.
32 
33SQL> SELECT ACCOUNT_STATUS FROM DBA_USERS WHERE USERNAME='SCOTT';
34 
35ACCOUNT_STATUS
36--------------------------------
37EXPIRED(GRACE)
1SQL> connect scott/tiger
2Connected.
3 
4SQL> PASSWORD
5Changing password for SCOTT
6Old password:
7New password:
8Retype new password:
9Password changed