Issue:
SQL> alter user user1 identified by password1;
alter user user1 identified by password1
*
ERROR at line 1:
ORA-28007: the password cannot be reused
Solution:
1. Find the profile name:
SQL> SQL> select username,profile,account_status from dba_users where username='USER1';
USERNAME PROFILE ACCOUNT_STATUS
---------- --------------- ---------------
USER1 ADMINISTRATOR OPEN
2. Find the profile values:
SQL> select * from dba_profiles where profile='ADMINISTRATOR';
PROFILE RESOURCE_NAME RESOURCE LIMIT COM
-------------------- -------------------------------- -------- -------------------- ---
ADMINISTRATOR COMPOSITE_LIMIT KERNEL DEFAULT NO
ADMINISTRATOR SESSIONS_PER_USER KERNEL DEFAULT NO
ADMINISTRATOR CPU_PER_SESSION KERNEL DEFAULT NO
ADMINISTRATOR CPU_PER_CALL KERNEL DEFAULT NO
ADMINISTRATOR LOGICAL_READS_PER_SESSION KERNEL DEFAULT NO
ADMINISTRATOR LOGICAL_READS_PER_CALL KERNEL DEFAULT NO
ADMINISTRATOR IDLE_TIME KERNEL DEFAULT NO
ADMINISTRATOR CONNECT_TIME KERNEL DEFAULT NO
ADMINISTRATOR PRIVATE_SGA KERNEL DEFAULT NO
ADMINISTRATOR FAILED_LOGIN_ATTEMPTS PASSWORD 5 NO
ADMINISTRATOR PASSWORD_LIFE_TIME PASSWORD 90 NO
ADMINISTRATOR PASSWORD_REUSE_TIME PASSWORD 180 NO
ADMINISTRATOR PASSWORD_REUSE_MAX PASSWORD UNLIMITED NO
ADMINISTRATOR PASSWORD_VERIFY_FUNCTION PASSWORD VERIFY_FUNCTION_11G NO
ADMINISTRATOR PASSWORD_LOCK_TIME PASSWORD 7 NO
ADMINISTRATOR PASSWORD_GRACE_TIME PASSWORD 14 NO
16 rows selected.
SQL>
3. Alter the profile values:
SQL> alter profile ADMINISTRATOR limit password_verify_function NULL;
Profile altered.
SQL> alter profile ADMINISTRATOR limit PASSWORD_REUSE_TIME UNLIMITED;
Profile altered.
4. Change the password:
SQL> alter user user1 identified by password1;
User altered.
SQL>
5. After changing the password restore the default/old settings:
SQL> alter profile ADMINISTRATOR limit password_verify_function VERIFY_FUNCTION_11G;
Profile altered.
SQL> alter profile ADMINISTRATOR limit PASSWORD_REUSE_TIME 180;
Profile altered.
SQL>
No comments:
Post a Comment