ORA-28001 the password has expired

Situation

登入Oracle DB時出現password has expired訊息

Solution

1. ALTER USER [使用者] ACCOUNT UNLOCK;

2. ALTER USER  [使用者]  IDENTIFIED BY [新密碼];

3. 由於建立user時所使用的profile是DEFAULT, 其中PASSWORD_LIFE_TIME為180天, 如果這期間沒有改過密碼, 180天之後就會被Locked

SELECT USERNAME,PROFILE FROM DBA_USERS WHERE USERNAME = [使用者];

SELECT * FROM DBA_PROFILES WHERE PROFILE = ‘DEFAULT‘ AND RESOURCE_TYPE = ‘PASSWORD’;

ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;

因為修改DEFAULT profile會影響所有相關使用者, 建議另建一PROFILE來做此設定

CREATE PROFILE ADM LIMIT PASSWORD_LIFE_TIME UNLIMITED;

ALTER USER [使用者] PROFILE ADM;

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s