IBM i Global

IBM i 

A space for professionals working with IBM’s integrated OS for Power systems to exchange ideas, ask questions, and share expertise on topics like RPG and COBOL development, application modernization, open source integration, system administration, and business continuity.


#Power


#IBMi
#Power
 View Only
  • 1.  Getting my authorization lists back on objects

    Posted Mon March 25, 2024 04:46 PM

    Hi, 

    I thought I could get my authorization lists back on objects by restoring the user profile pvtaut then doing a rstaut from a savsecdta backkup but it's not working. 

    I'm grabbing that savsecdta from a system where the authorities are intact and I'm trying to restore them on a different development system. The source system is at v7r4 and I just recently upgraded the target system to v7r5. Would that be an issue? 



    ------------------------------
    Michael Cramer
    ------------------------------


  • 2.  RE: Getting my authorization lists back on objects

    Posted Mon March 25, 2024 10:06 PM
    Edited by Satid S Mon March 25, 2024 10:14 PM

    Dera Michael

    I did a Google search with "ibm i authorization list restore" and found useful information here:  Restoring authorization lists at https://www.ibm.com/docs/en/i/7.4?topic=information-restoring-authorization-lists       This means you need to restore all relevant user profiles and authorization lists first BEFORE you restore objects that make use of the AUTL and the restored objects will be automatically assigned to AUTL.

    Basically, you need to follow this in sequence ;

    1) Delete all existing relevant objects (that are to be attached to authorization lists) from your target system.

    2) Do SAVSECDTA or SAVSYS from the source system. Be sure to review the job log after the save finishes.

    3) Do RSTUSRPRF USRPRF(*ALL) at the target system. Be sure to review the job log after the restore finishes. You may want to run WRKAUTL *ALL to make sure all are in place. 

    4) Save all the objects that are to be attached to authorization lists from the source system and restore them to the target system.  Be sure to review the job log after the restore finishes.

    5) Do RSTAUT in the target system. 

    Wishing you good luck this time. 



    ------------------------------
    Satid S
    ------------------------------



  • 3.  RE: Getting my authorization lists back on objects

    Posted Mon March 25, 2024 10:10 PM
      |   view attached

    This IBM i save/restore chart I attach herewith can be a useful future reference for you. 



    ------------------------------
    Satid S
    ------------------------------



  • 4.  RE: Getting my authorization lists back on objects

    Posted Tue March 26, 2024 02:15 PM

    Hi Satid, 

    I shouldn't have to delete the objects and use *all on the rstusrprf. These objects are all owned by one single profile so that's the one I'm restoring. Same with the rstaut. And yes, I already looked at a google search and IBM documentation. That's how I came up with this procedure. 

    Another thing is the *all on the rstaut requires a restricted state which I'm trying to avoid. 



    ------------------------------
    Michael Cramer
    ------------------------------



  • 5.  RE: Getting my authorization lists back on objects

    Posted Tue March 26, 2024 10:26 PM

    Dear Michael

    If you do not want to delete the objects and run RSTUSRPRF *ALL, then the only alternative is to use GRTOBJAUT command for each AUTL you want to recover for the objects in your target system. In this attempt, you may consider using IBM i service AUTHORIZATION_LIST_INFO (and perhaps also AUTHORIZATION_LIST_USER_INFO) to compare AUTL details between your source and target systems before you know which AUTL you need to recover. 



    ------------------------------
    Satid S
    ------------------------------



  • 6.  RE: Getting my authorization lists back on objects

    Posted Wed March 27, 2024 12:48 PM

    Yes, I've been using that sql function to compare systems. Thanks. 

    But why can't I restore that one needed profile and use the same one on the rstaut? I think we are missing some details here because to me that should work. 

    Also, what does deleting and restoring the objects buy me at this point? 



    ------------------------------
    Michael Cramer
    ------------------------------



  • 7.  RE: Getting my authorization lists back on objects

    Posted Wed March 27, 2024 02:40 PM
    • You must specify USRPRF(*ALL) or USRPRF(*NEW) to restore authorization lists and authority holders.

    https://www.ibm.com/docs/en/i/7.5?topic=ssw_ibm_i_75/cl/rstusrprf.html

    Also 7.5 changed.  "If *ALL is specified for the User profile (USRPRF) parameter on the Restore User Profiles (RSTUSRPRF) command, it is no longer required that all other operations on the system be ended."  https://www.ibm.com/docs/en/i/7.5?topic=rys-whats-new-i-75



    ------------------------------
    Robert Berendt IBMChampion
    ------------------------------



  • 8.  RE: Getting my authorization lists back on objects

    Posted Wed March 27, 2024 02:44 PM

    if that's a must to specify *all, why is a single user profile allowed with *pvtaut then? this doesn't make sense. 



    ------------------------------
    Michael Cramer
    ------------------------------



  • 9.  RE: Getting my authorization lists back on objects

    Posted Wed March 27, 2024 10:39 PM

    Dear Michael

    When you mentioned "....get my authorization lists back on objects....." in your original post, did you mean you want a number of AUTL to be assigned to a group of your application objects in the target system? 

    If so, RSTUSRPRF *ALL would be the best way if there are very many AUTL to be assigned to very many objects. But this method is designed such that the application objects must be restored (in a different system)) with ALWOBJDIF(*ALL) or ALWOBJDIF(*AUTL) or ALWOBJDIF(*COMPATIBLE)  AFTER all AUTL are restored (with RSTUSRPRF *ALL) for all AUTLs to be automatically linked to application objects when they are restored. (You did not mention how many you are dealing with.)  But if there are just a few AUTL to be assigned to objects and you already have most or all AUTL and objects in place, it is better to manually create the missing AUTLs and/or assign each of AUTLs to objects with GRTOBJAUT.    No other ways (that you asked) will link AUTLs to objects.

    Doing any thing with users' private authority is irrelevant here as far as linking AUTLs to objects is concerned.  All your subsequent questions after your original post did not seem to be about AUTL at all. (If you think they are, you have a misunderstanding about the matter.) You seem to focus only on private authority but it is just a part of the entire picture of using AUTL.  In fact, once you assign an AUTL to an object (manually or automatically at object restore), private authority of those users to the object associated with AUTL is automatically handled under the cover.   

    If my understanding of your original post is incorrect, please restate your question or provide more contextual information. 



    ------------------------------
    Satid S
    ------------------------------