Check user having Default password in Oracle Database
Fetch the list of user present with Default Password in Oracle
1. Login with the SQLPLUS with SYSDBA user.
SQLPLUS / as sysdba
2. Check the User with Default password with following query:
Set line 200 pages 200
set col username for a22
SELECT d.username, u.account_status FROM DBA_USERS_WITH_DEFPWD d, DBA_USERS u
WHERE d.username = u.username ORDER BY 2,1;
3. You can also check user which is in open state and having default password.
Set line 200 pages 200
set col username for a22
SELECT d.username, u.account_status FROM DBA_USERS_WITH_DEFPWD d, DBA_USERS u
WHERE d.username = u.username and u.account_status='OPEN' ORDER BY 2,1;
4. You can check user which is locked state with default password.
Set line 200 pages 200
set col username for a22
SELECT d.username, u.account_status FROM DBA_USERS_WITH_DEFPWD d, DBA_USERS u
WHERE d.username = u.username and u.account_status='LOCKED' ORDER BY 2,1;
5. Change the Default password with following command:
-- for change the username password
ALTER USER username IDENTIFIED BY password;
-- If you want to unlock them also use following command:
ALTER USER username ACCOUNT UNLOCK IDENTIFIED BY password;