Oracle 11g – Password expires

 

Oracle 11g sets by default password expiration. The expired message needs to re-login and reset the old password to new one.

Suppose you have an user with the status “expired”:

You can check that by:

1SQL> select username, account_status, expiry_date, profile from dba_users;
01USERNAME             ACCOUNT_STATUS       EXPIRY_DA PROFILE
02 
03-------------------- -------------------- --------- ----------
04 
05SOE                  OPEN                 18-JAN-12 DEFAULT
06 
07BRAVO                 EXPIRED              30-MAY-13 DEFAULT
08 
09SCOTT                EXPIRED & LOCKED     15-JUL-11 DEFAULT
10 
11ORACLE_OCM           EXPIRED & LOCKED     05-SEP-10 DEFAULT
12 
13XS$NULL              EXPIRED & LOCKED     05-SEP-10 DEFAULT
14 
15MDDATA               EXPIRED & LOCKED     05-SEP-10 DEFAULT
16 
17DIP                  EXPIRED & LOCKED     05-SEP-10 DEFAULT
18 
19APEX_PUBLIC_USER     EXPIRED & LOCKED     05-SEP-10 DEFAULT
12) SQL> alter user BRAVO identified by TESTING;

3) To avoid to have users with “expired” password, you have two options:
– Create a new profile and set your own definitions about dates to expire the passwords
– Change the default profile

4) Let’s make an example how to do that:

Checking profiles:

1SQL> SELECT profile, resource_name, limit FROM dba_profiles WHERE profile='DEFAULT';
01PROFILE    RESOURCE_NAME                    LIMIT
02 
03---------- -------------------------------- ----------------------------------------
04 
05DEFAULT    COMPOSITE_LIMIT                  UNLIMITED
06 
07DEFAULT    SESSIONS_PER_USER                UNLIMITED
08 
09DEFAULT    CPU_PER_SESSION                  UNLIMITED
10 
11DEFAULT    CPU_PER_CALL                     UNLIMITED
12 
13DEFAULT    LOGICAL_READS_PER_SESSION        UNLIMITED
14 
15DEFAULT    LOGICAL_READS_PER_CALL           UNLIMITED
16 
17DEFAULT    IDLE_TIME                        UNLIMITED
18 
19DEFAULT    CONNECT_TIME                     UNLIMITED
20 
21DEFAULT    PRIVATE_SGA                      UNLIMITED
22 
23DEFAULT    FAILED_LOGIN_ATTEMPTS            10
24 
25DEFAULT    PASSWORD_LIFE_TIME               180
26 
27PROFILE    RESOURCE_NAME                    LIMIT
28 
29---------- -------------------------------- ----------------------------------------
30 
31DEFAULT    PASSWORD_REUSE_TIME              UNLIMITED
32 
33DEFAULT    PASSWORD_REUSE_MAX               UNLIMITED
34 
35DEFAULT    PASSWORD_VERIFY_FUNCTION         NULL
36 
37DEFAULT    PASSWORD_LOCK_TIME               1
38 
39DEFAULT    PASSWORD_GRACE_TIME              7

5) Changing the password_life_time for unlimited

1SQL> alter profile default limit password_life_time unlimited;