• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2581
  • Last Modified:

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
0
basirana
Asked:
basirana
  • 5
  • 4
1 Solution
 
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
 
basiranaAuthor Commented:
I am getting error ORA-28007: the password cannot be reused
0
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
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
 
sdstuberCommented:
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
 
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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now