Set oracle user password to never expire

Modifying the oracle user password never expires. It is convenient to use in the test environment. This setting should not be set in a production environment.

method/step

  1. Check which user's proifle is, usually default:

    sql>SELECT username,PROFILE FROM dba_users;

  2. View password expiration settings for a specified profile (such as default):

    sql>SELECT * FROM dba_profiles s WHERE s.profile='DEFAULT' AND resource_name='PASSWORD_LIFE_TIME';

  3. Change the password validity period from the default 180 days to "unlimited":

    ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;

    No need to restart the database after modification, it will take effect immediately.

  4. 4

    After modification, accounts that have not been prompted with ORA-28002 warning will not encounter the same prompt again;

    Accounts that have been prompted must change their passwords again, for example:

     $sqlplus / as sysdba

    sql> alter user smsc identified by <original password> ---- no need to change the new password

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327070739&siteId=291194637