Some time ago I wrote the WRKUSRAUD, ADDUSRAUD and RMVUSRAUD commands to help me manage user profiles object and user action audit requirements. Recently I needed to perform similar updates to user profiles’ special authority setting, and therefore found it useful to create similar commands for the purpose of adding and removing special authority to user profiles. This effort brought about the Add User Special Authority (ADDUSRSPCA) and the Remove User Special Authority (RMVUSRSPCA) commands that I make available with this article today.
Here’s what the ADDUSRSPCA command prompt looks like:
Add User Special Authority (ADDUSRSPCA) Type choices, press Enter. User profile . . . . . . . . . . *ALL Name, generic*, *ALL User class . . . . . . . . . . . *ANY *ANY, *USER, *SYSOPR... User special authority . . . . . *SAME *SAME, *NONE, *ALLOBJ... + for more values Replace user special authority *NO *YES, *NO
The ADDUSRSPCA command allows you to select the user profiles to add the specified special authority value(s) based on a user profile name or generic name, or the special value *ALL. You can specify a user class to further narrow your selection of user profiles to update, as well as control whether the special authority value(s) should replace current special authorities, or just be added, if necessary. Please refer to the command’s help text for all the details.
The RMVUSRSPCA command prompt is very similar to the ADDUSRSPCA prompt in its appearance:
Remove User Special Authority (RMVUSRSPCA) Type choices, press Enter. User profile . . . . . . . . . . Name, generic*, *ALL User class . . . . . . . . . . . *ANY *ANY, *USER, *SYSOPR... User special authority . . . . . *SAME *SAME, *NONE, *ALLOBJ... + for more values
The same selection criteria are available to identify the user profiles to process, and again the command help text will further document how to use the command as well as how the command works.
The following sources are involved in creating the ADDUSRSPCA and RMVUSRSPCA commands:
SEC109M CLP Add & Remove User Special Auth - Build commands SEC1091 RPGLE Add User Special Authority - CPP SEC1091H PNLGRP Add User Special Authority - Help SEC1091V RPGLE Add User Special Authority - VCP SEC1091X CMD Add User Special Authority SEC1092 RPGLE Remove User Special Authority - CPP SEC1092H PNLGRP Remove User Special Authority - Help SEC1092V RPGLE Remove User Special Authority - VCP SEC1092X CMD Remove User Special Authority
Compile and run the SEC109M CL program, specifying the library to contain the ADDUSRSPCA and RMVUSRSPCA commands as the only parameter to have the commands and all associated objects created for you. Before running the commands in a production environment please test the commands thoroughly to ensure that they work as you expect.