SHARE
TWEET

Untitled

a guest Jul 19th, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --
  2. -- description: Which users lack basic authority to their own user profile?
  3. --
  4. select *
  5.   from qsys2.object_privileges
  6.   where object_type = '*USRPRF'
  7.         and object_name = authorization_name
  8.         and (object_operational <> 'YES'
  9.           or object_management  <> 'YES'
  10.           or data_read    <> 'YES'
  11.           or data_add     <> 'YES'
  12.           or data_update  <> 'YES'
  13.           or data_delete  <> 'YES'
  14.           or data_execute <> 'YES');
  15.          
  16. --
  17. -- description: Review of *USRPRF ownership (summary)
  18. --
  19. select USER_OWNER, COUNT(*) as OWNERSHIP_COUNT
  20.   from qsys2.user_info
  21.   group by user_owner
  22.   order by 2 desc;    
  23.  
  24.          
  25. --
  26. -- description: Review of *USRPRF ownership (detail)
  27. --
  28. select USER_OWNER, USER_NAME, u.*
  29.   from qsys2.user_info u
  30.   where user_owner not in ('QSYS', 'QSECOFR')
  31.   order by 1,2 desc;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top