← Users & Privileges
Oracle · Users & Privileges
How to check password expiry and profile limits in Oracle
Check Oracle password expiry and profile limits: failed logins, password life, reuse, lock time, and days to expiry.
Tested on11g12c19c21c23ai26ai
Two views of password policy: the limits set on each profile, and every account with its password expiry date and the days remaining. Useful before a password rollout or an audit.
-- Password and resource limits per profile
SELECT profile, resource_name, limit
FROM dba_profiles
WHERE resource_name IN ('FAILED_LOGIN_ATTEMPTS','PASSWORD_LIFE_TIME',
'PASSWORD_GRACE_TIME','PASSWORD_REUSE_MAX',
'PASSWORD_REUSE_TIME','PASSWORD_LOCK_TIME',
'PASSWORD_VERIFY_FUNCTION','SESSIONS_PER_USER','IDLE_TIME')
ORDER BY profile, resource_name;
-- Accounts and when their password expires
SELECT username,
account_status,
expiry_date,
ROUND(expiry_date - SYSDATE) AS days_to_expiry,
profile
FROM dba_users
WHERE expiry_date IS NOT NULL
ORDER BY expiry_date;passwordprofiledba_profilesexpiry