When I was planning the WRKUSRAUD command design some time ago, I found out that IBM with release 6.1 added 18 new user audit values to the 13 original ones. As a consequence of this enlightenment – and due to the circumstance that I was planning to integrate the UPDUSRAUD, ADDUSRAUD and RMVUSRAUD commands in the WRKUSRAUD command – I’ve updated the three mentioned commands to include the new audit values.
Here are the links to the newsletter articles discussing the three User Audit commands:
Add and Remove User Audit Values
Download the zip file containing the source code.
Here’s the final version of the WRKUSRAUD command that I ended up with. I added an outfile option, remodeled the work with-panel and included a comprehensive help text panel group. The command prompt now looks like this:
Work with User Auditing (WRKUSRAUD) Type choices, press Enter. User profile . . . . . . . . . . *ALL Name, generic*, *ALL... User class . . . . . . . . . . . *ANY *ANY, *USER, *SYSOPR... User action auditing . . . . . . *ANY *ALL, *ANY, *NONE... + for more values Object auditing value . . . . . *ANY *ALL, *CHANGE, *ANY, *NONE Output . . . . . . . . . . . . . * *, *PRINT, *OUTFILE Output file . . . . . . . . . . Name Library . . . . . . . . . . . *LIBL Name, *LIBL, *CURLIB Replace or add records . . . . . *ADD *ADD, *REPLACE
The work-with panel’s initial view is shown below:
Work with User Auditing WYNDHAMW 27-08-12 08:38:07 User profile . . . . . *ALL Position to . . . . . Type options, press Enter. 1=Add user auditing 2=Update 3=Copy 4=Remove 5=Display user User User Group Object Obj Pgm Opt Profile Class Profile Auditing Cmd Crt Dlt Mgt Srv Adp DAN *SECOFR NOVAGRPIT *NONE X GARY *USER NOVAGRPBOK *CHANGE X X X X CHUCK *PGMR NOVAGRPIT *NONE X SCOTT *SECOFR NOVAGRPIT *NONE X CARSTEN *SYSOPR NOVAGRPIT *NONE X JOHN *PGMR NOVAGRPIT *NONE X PAUL *PGMR NOVAGRPIT *NONE X GEORGE *PGMR NOVAGRPIT *NONE X RINGO *SECOFR *NONE *NONE X More... Parameters or command ===> F3=Exit F4=Prompt F5=Refresh F6=Change user audit F9=Retrieve F10=Auditing commands F11=View 2 F12=Cancel F17=Top F18=Bottom (C) SecureMyi, 2012.
View 2:
Work with User Auditing WYNDHAMW 27-08-12 08:38:07 User profile . . . . . *ALL Position to . . . . . Type options, press Enter. 1=Add user auditing 2=Update 3=Copy 4=Remove 5=Display user User Sav Spl Sys Aut Pgm Prt Ofc -----Job----- Opt Profile Rst Dta Mgt Opt Fail Fail Dta Srv Dta Bas Usr DAN X GARY X X X X X X CHUCK X SCOTT X CARSTEN JOHN X PAUL GEORGE X RINGO More... Parameters or command ===> F3=Exit F4=Prompt F5=Refresh F6=Change user audit F9=Retrieve F10=Auditing commands F11=View 3 F12=Cancel F17=Top F18=Bottom
View 3:
Work with User Auditing WYNDHAMW 27-08-12 08:38:07 User profile . . . . . *ALL Position to . . . . . Type options, press Enter. 1=Add user auditing 2=Update 3=Copy 4=Remove 5=Display user User --------------Security-------------- ------Network------- Opt Profile Sec Cfg Dir IPC NAS Run Sck Vfy VldL Cmn Bas Clu Fail Sck DAN X GARY X X CHUCK X SCOTT X CARSTEN X JOHN X PAUL X GEORGE X RINGO X More... Parameters or command ===> F3=Exit F4=Prompt F5=Refresh F6=Change user audit F9=Retrieve F10=Auditing commands F11=View 1 F12=Cancel F17=Top F18=Bottom
The following sources make up the WRKUSRAUD command:
SEC105 RPGLE Work with User Auditing - CPP SEC105H PNLGRP Work with User Auditing - Help SEC105P PNLGRP Work with User Auditing - Panel Group SEC105V RPGLE Work with User Auditing - VCP SEC105X CMD Work with User Auditing SEC105M CLP Work with User Auditing - Build command
Compile and run the SEC105M CL program, specifying the library to contain the WRKUSRAUD command as the only parameter to have the command and all associated objects created for you. The updated versions of the ADDUSRAUD, UPDUSRAUD and RMVUSRAUD commands that support all new user action auditing values – and the new CPYUSRAUD command – which all together are available as list actions in the above work-with panel, are all included in the download zip-file.
Download the zip file containing the source code.
The Copy User Auditing (CPYUSRAUD) command is a prerequisite to the Work with User Auditing (WRKUSRAUD) command presented above. The following sources are included in the attached zip file:
SEC104 RPGLE Copy User Auditing - POP SEC104H PNLGRP Copy User Auditing - Help SEC104V RPGLE Copy User Auditing - VCP SEC104X CMD Copy User Auditing SEC104M CLP Copy User Auditing - Build command
Compile and run the SEC104M CL program, specifying the library to contain the CPYUSRAUD command as the only parameter to have the command and all associated objects created for you.
The CPYUSRAUD command will copy all user action and object auditing values from the specified user profile to the specified target user profile. Any current audit values associated with the target user profile are replaced during the copy operation. The CPYUSRAUD command is therefore useful in situations where you want other user profiles to have the exact same user action and object audit values assigned as a given model user profile.
Hi Carsten. I recently discovered your wonderful tool when I was attempting to assist a customer looking to chasnge the user auditing for a group of users. The code works great, but I wondered why it only allows you to work with user profiles that you have READ access to as opposed to all user profiles if I am running the command under a user profile with *ALLOBJ?
Perhaps I missed something in the articles, which have disappeared from the ipro developer link. Can you send me the articles or a new link? Thanks.
LikeLike
Hi Mike. The requirement mentioned for any user profile accessing another user profile to have at least *READ authority to that user profile is a system restriction. If you’re running the command under a user profile having *ALLOBJ special authority, then you will be able to list all user profiles on that system. The special authority *ALLOBJ is equal to having *ALL object authority to all objects an the system:
https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_73/rzarl/rzarlallobjsa.htm
Are you encountering any problems running the WRKUSRAUD command?
LikeLike
Hi Carsten.
Yes, when I run the command using *ALL under my user profile which has *ALLOBJ or even under QSECOFR I only see 3 user profiles – a small subset of all the profiles on the system.
LikeLike
OK, I understand what you’re saying. The WRKUSRAUD command will only list user profiles that currently have one or more user audit values associated to it.
If you need to update user audit values for a user profile that currently has no user audit values associated, and therefore is not present in the list panel, you can use the function key F6=Change User Auditing to add user audit values to the user profile in question.
Note, that following a successful run of the CHGUSRAUD command, you must press function key F5=Refresh to include the newly added user profile in the list.
LikeLike
Perfect, I understand now how it works. I probably would have known this had I been able to read the original articles, but I guess they have been archived. Thanks for the help Carsten and I like this tool very much and will have it in my toolkit for customers.
LikeLike