SQL*Plus: Release Production on Thu Sep 20 13:08:07 2018

Copyright (c) 1982, 2016, Oracle. All rights reserved.

Enter user-name: system
Enter password:
ORA-28002: the password will expire within 4 days

Every time I login into my database it shows this warning message of password gonna expire in .. days. Now its just 4 days left I don't know what to do to fix this warning.

  • 3
    I assume that you are asking here because you've already tried changing your password? – Andy Turner Sep 20 '18 at 7:58

Use the password command after logging in to change your password:

SQL> password
Changing password for SYSTEM
Old password:
New password:
Retype new password:
Password changed

The SYS account is in a Profile that enforces password expiration.
There are two ways of tackling this.

The first is just to deal with it and change the password when[ever] it expires, making sure that you store the new password somewhere safe so that your fellow DBAs can find it. If you're running Data Guard and OEM insists on connecting as SYS instead of DBSNMP to manage it, you also have to update the password in OEM, which is a Royal pain.

The alternative is to prevent the password from expiring at all. To do so, you need to reconfigure the Profile that the SYS account belongs to, or create a new profile with the necessary properties:

select username, profile 
from dba_users 
where username = 'SYS' ; 

--------  -------

select profile, limit 
from dba_profiles 
where resource_name = 'PASSWORD_LIFE_TIME' ; 

-------  -----

Alternatively, if you want to do that as a privileged user (SYS probably being the most popular whose privileges are abused), you can change password for any other user using ALTER USER command, such as

SQL> show user
SQL> alter user scott identified by tiger;

User altered.


Saying that SYS is abused means that you should avoid using it. Instead, create a new privileged user (as KCDBA in my example), grant it DBA role and let it perform DBA tasks. Leave SYS (and SYSTEM and similar Oracle-owned users) alone.



You should not be logging in as SYSTEM in the first place.

Assign someone the DBA role, but not as a DEFAULT role. This way, the DBA (person) has to enable the role using his/her account . This gives you the ability to AUDIT who logged in to do something and what he/she did.

If you want, you can even add a password to the ROLE.


As you are using Oracle. You can run below mentioned command to change the password:

alter user SYSTEM
identified by **password**

You can run this command after successfully logging in to oracle database

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy