In today’s article, we will learn how to find Assigned Users using the ADMIN_OPTION role in Oracle Database.
We will perform a security scan on Oracle Database.
This is how we can find users assigned using the ADMIN_OPTION role.
FOR ORACLE DATABASE 11G
1 2 3 4 5 6 7 8 |
SELECT A.grantee, A.granted_role, A.admin_option FROM dba_role_privs A, dba_roles B WHERE A.admin_option = 'YES' AND A.grantee = B.ROLE AND A.grantee NOT IN ( 'DBA' ) |
FOR ORACLE DATABASE 12C
1 2 3 4 5 6 7 8 |
SELECT a.grantee, a.granted_role, a.admin_option FROM dba_role_privs a, dba_users b WHERE a.admin_option = 'YES' AND a.grantee b.username AND b.orcle_maintained <> 'Y'; |