Changing, expiring, and unlocking password in Oracle Database

How to change a password

Message 1. Modified by Burgess November, 7, 2016 To the top ↑
Change a password for the USER1 user. New password is NEWPASSWORD.
SQL> alter user USER1 identified by NEWPASSWORD;
 

How to make a password non-expiring

Message 2. Modified by Burgess November, 7, 2016 To the top ↑
This actions help you to fix the "ORA-28001: the password has expired" error.
1. Get a profile name for the USER1 user.
SQL> select profile from dba_users where username='user1';
 
PROFILE
---------------
DEFAULT
 
The profile name is DEFAULT.
2. You can get the current password limit value for the DEFAULT profile.
SQL> select resource_name,limit from dba_profiles where profile='DEFAULT';
 
3. Change the password limit to non-expiring for the profile.
SQL> alter profile default limit password_life_time unlimited;
 
Profile altered.
 
Now the user password is non-expiring.

How to unlock an account

Message 3. Modified by Burgess November, 7, 2016 To the top ↑
Unlock an account of the USER1 user.
SQL> alter user USER1 account unlock;
 
Do you want to add or ask something? Contact us!