The error ORA-28001: the password has expired occurs in Oracle when a user's password has reached its expiration date. This can be resolved by changing the expired password.
Here’s how you can resolve it:
Solution 1:
Change the Password for the User
Log in as a privileged user (e.g., SYSDBA or a user with the ALTER USER privilege):
sqlplus / as sysdba
Change the expired password:
ALTER USER username IDENTIFIED BY new_password;
Replace username with the actual Oracle username and new_password with the new password.
Verify the change: After changing the password, you can test by logging in with the user account:
sqlplus username/new_password@dbname
Solution 2:
Set the Password Expiry Policy
To prevent the password from expiring in the future, you can modify the user profile to disable password expiration or extend the password life.
Check which profile the user is assigned:
SELECT username, profile FROM dba_users WHERE username = 'username';
Modify the password life for the profile:
ALTER PROFILE profile_name LIMIT PASSWORD_LIFE_TIME UNLIMITED;
If you want the password to never expire, set PASSWORD_LIFE_TIME to UNLIMITED. Replace profile_name with the profile assigned to the user.
Verify profile settings
SELECT * FROM dba_profiles WHERE profile = 'profile_name' AND resource_name = 'PASSWORD_LIFE_TIME';
Solution 3:
Temporary Password Expiration Grace Period
If you prefer to give users a grace period before the password fully expires, you can modify the profile to allow more time.
Set a grace period:
ALTER PROFILE profile_name LIMIT PASSWORD_GRACE_TIME 10;
This will give users a 10-day grace period to change their password after expiration.
No comments:
Post a Comment