Skip to content
Home » Oracle » How to Set Password Never Expire

How to Set Password Never Expire

PASSWORD_LIFE_TIME UNLIMITED

The password expiration notice is actually an Oracle error, ORA-28002: the password will expire within days. To avoid the error, we have to make the lifetime of password span longer or unlimited.

First of all, make sure that you're in the right database.

SQL> select name from v$database;

NAME
---------------------------
ORCL

Check what profile the user is applied.

SQL> select profile from dba_users where username = 'STEVE';

PROFILE
--------------------------------------------------------------------------------
DEFAULT

We set unlimited PASSWORD_LIFE_TIME on profile DEFAULT.

SQL> alter profile default limit password_life_time unlimited;

Profile altered.

Users who are applied with the profile now have never expired password. This is how we avoid password expired notice.

On the other hand, if you're facing some security issues, you do have ways to expire user passwords manually to counter PASSWORD_LIFE_TIME.

Leave a Reply

Your email address will not be published. Required fields are marked *