EXPIRED(GRACE)

Hi

We have recently set the profiles for users to change password and there is a problem for users. Most of the users status have changed to lock as password expired after setting profile.

We want to make those users whose password is going to expire or users whose accounts are locked because of profile settings. Can you please help me with some scripts to handle the current situation.

Thanks
basiranaAsked:
Who is Participating?
 
sdstuberConnect With a Mentor Commented:
First, find what the limits are currently set to....

SELECT profile, resource_name, LIMIT
  FROM dba_profiles
 WHERE resource_name IN ('PASSWORD_REUSE_TIME', 'PASSWORD_REUSE_MAX')


Save that output somewhere


To allow password reuse....

ALTER PROFILE your_profile_name
   LIMIT PASSWORD_REUSE_TIME UNLIMITED
   PASSWORD_REUSE_MAX UNLIMITED;


Then put it back....

ALTER PROFILE your_profile_name
   LIMIT PASSWORD_REUSE_TIME <whatever the limit was from the above query>
   PASSWORD_REUSE_MAX <whatever the limit was from the above query>;

0
 
sdstuberCommented:
select the users current hashed password from dba_users.
then assign that same password back to that user.

select username,password from dba_users

for example....

alter user SOMEUSER identified by values '459EA8089C0094DC';


that will reset the password timer
0
 
sdstuberCommented:
you can build the above dynamically...


SELECT 'alter user ' || username || ' identified by values ''' || password || ''';'
  FROM dba_users
 WHERE account_status LIKE 'LOCKED%';
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
basiranaAuthor Commented:
I am getting error ORA-28007: the password cannot be reused
0
 
sdstuberCommented:
change the profile to allow reuse, then reset the passwords then change the profile to put that rule back on
0
 
basiranaAuthor Commented:
How do I change the profile to reuse
0
 
basiranaAuthor Commented:
How do I know what profile is set for reuse
0
 
DavidSenior Oracle Database AdministratorCommented:
1.  Determine which profile is in use.
SELECT username, profile FROM dba_users
WHERE account_status LIKE 'LOCKED%';
2.  Reuse the profiles, as suggested, by modifying them so that password limitations are removed.  For example:
ALTER PROFILE DEFAULT PASSWORD_VERIFY_FUNCTION NULL,
  PASSWORD_LOCK_TIME UNLIMITED;
3. Fix your profiles and reapply after your crisis is over.

0
 
basiranaAuthor Commented:
Thank you
0
 
sdstuberCommented:
glad I could help
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.