Tuesday, February 23, 2010

Oracle database 11g default password policies

I recently booted a VM that I hadn't used in some time and found this error appeared when I fired up sqlplus
ERROR:
ORA-28002: the password will expire within 7 days
From what I've been able to gather Oracle database 11g sets up a password expiration policy by default. This isn't usually a problem for me since I usually create a VM, work on it for a week or six before moving on to another project. But this VM is special - it's my combined IAM stack demo VM from OpenWorld and I need it every once in a while.

If you find yourself in this position here's how you disable the password policies and get things working again.
First turn off the password policies:
ALTER PROFILE DEFAULT LIMIT
FAILED_LOGIN_ATTEMPTS UNLIMITED
PASSWORD_LIFE_TIME UNLIMITED
PASSWORD_GRACE_TIME UNLIMITED;
Then check the status of your accounts:
set line 120
select username, account_status, expiry_date, lock_date from dba_users;
Then reenable the ods user and any other users by resetting their password:
alter user ods identified by abcd1234;
Hope this helps!

Remember: Don't do this in production!

1 comment:

  1. I faced the same situation. This post is very helpful. Thank you.

    ReplyDelete

Note: Only a member of this blog may post a comment.