The most recent password change date for users in the Oracle database is in the ptime field in the sys.user $ table. With a query like the following, we can find out when a user last changed the password.
in sys.user$ table;
NAME: user or role name
TYPE #: 0 means role, 1 means user
CTIME: date created
PTIME: last password change date
EXPTIME: the date the password was last expired
LTIME: the latest lock date
LCOUNT: how many times he/she entered his/her password incorrectly
1 | SELECT name, ctime, ptime FROM sys.user$ WHERE name = 'write_user_name'; |
Thanks it helps!..
If granting access to SYS.USER$ (for non-DBAs) is an issue, below query is an alternative:
SELECT U.USERNAME, (SELECT U.EXPIRY_DATE – P.LIMIT FROM DBA_PROFILES P
WHERE P.PROFILE = U.PROFILE AND P.RESOURCE_NAME=’PASSWORD_LIFE_TIME’) PWD_CHG_DT
FROM DBA_USERS U WHERE U.USERNAME=’&USER_NAME’;