a guest Jul 19th, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- -- description: Which users lack basic authority to their own user profile?
- select *
- from qsys2.object_privileges
- where object_type = '*USRPRF'
- and object_name = authorization_name
- and (object_operational <> 'YES'
- or object_management <> 'YES'
- or data_read <> 'YES'
- or data_add <> 'YES'
- or data_update <> 'YES'
- or data_delete <> 'YES'
- or data_execute <> 'YES');
- -- description: Review of *USRPRF ownership (summary)
- select USER_OWNER, COUNT(*) as OWNERSHIP_COUNT
- from qsys2.user_info
- group by user_owner
- order by 2 desc;
- -- description: Review of *USRPRF ownership (detail)
- select USER_OWNER, USER_NAME, u.*
- from qsys2.user_info u
- where user_owner not in ('QSYS', 'QSECOFR')
- order by 1,2 desc;
RAW Paste Data