Home > Ask the AS/400 Experts > iSeries i5/OS and OS/400 Questions & Answers > See the users with *change or *all authority
Ask The iSeries 400 Expert: Questions & Answers
EMAIL THIS

See the users with *change or *all authority

Ken Graap EXPERT RESPONSE FROM: Ken Graap

Pose a Question
Other iSeries 400 Categories
Meet all iSeries 400 Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 16 December 2004
Is there a way to see the users with "change" or "all authority" on objects in a library? The library has 200 objects and we think users have been given unauthorized access.

>
You can examine and change each object's authority using the EDTOBJAUT command:

For example:

   EDTOBJAUT OBJ(ADOPTION) OBJTYPE(*QRYDFN)
 
    ...would product the following display:
 
                            Edit Object Authority                          
                                                                           
Object . . . . . . . :   ADOPTION        Owner  . . . . . . . :   QSECOFR  
  Library  . . . . . :     KENNETH       Primary group  . . . :   *NONE    
Object type  . . . . :   *QRYDFN         ASP device . . . . . :   *SYSBAS  
                                                                           
Type changes to current authorities, press Enter.                          
                                                                           
  Object secured by authorization list  . . . . . . . . . . . .   *NONE    
                                                                           
                           Object     -----Object------   ------Data-------
User         Group        Authority   O   M   E   A   R   R   A   U   D   E
*GROUP       QSECOFR      *ALL        X   X   X   X   X   X   X   X   X   X
*PUBLIC                   *CHANGE     X                   X   X   X   X   X
                                                                
All authority details for the object is shown here. Use F1 for each field for a detailed explanation of what it means.

After you have reviewed all the objects in library LIBQRY and made any changes to restrict access then consider making a few changes to help you set authority to objects as they are created in this library and to easily maintain the authority access for all the objects in this library.

There is an attribute for a library object (*LIB) that determines what the *PUBLIC authority for a newly created object in that library will be.

To view this attribute use the DSPLIB command:

For example:

DSPLIB LIB(KENNETH)

  ...would product the following display:
 
 
                                        Display Library                            
                                                                           
 Library  . . . . . . :   KENNETH         Number of objects  . :   265     
 Type . . . . . . . . :   TEST            Library ASP number . :   3       
 Create authority . . :   KENNETH         Library ASP device . :   *SYSBAS
 
 
The "Create Authority" attribute defines authority as outlined in this IBM Help Text:

For an object created into this library, this is the default public authority given to users who do not have specific authority to the object, who are not on the authorization list, and whose user group has no specific authority to the object.

The valid values are:

                                          
                                                                        
*SYSVAL                                                                 
    The default public authority for an object when it created in       
    this library is determined by the value specified by the QCRTAUT    
    system value.                                                       
                                                                        
*CHANGE   

The default public authority for objects created in this library is *CHANGE. The user can perform all operations on the object except those limited to the owner or controlled by object existence authority and object management authority.

*ALL

The default public authority for objects created in this library is *ALL. The user can perform all operations on the object except those limited to the owner or controlled by authorization list management authority.

*USE

The default public authority for objects created in this library is *USE. The user can perform basic operations on the object, such as run a program or read a file.

*EXCLUDE The default public authority for objects created in this library is *EXCLUDE. The user is prevented from accessing the object.

Authorization list name

The name of the authorization list that secures an object when it is created in this library. The default public authority is taken from the authorization list and the public authority for the object is specified as *AUTL.

This provides a great way to set *PUBLIC authority for newly created objects in a library.

In this example I've chosen to specify the name of an Authority List (*AUTL), KENNETH.

You create an authority list use the CRTAUTL command. To edit the list use the EDTAUTL command:

For example:

EDTAUTL AUTL(KENNETH)

...would product the following display:

                            Edit Authorization List                       
                                                                          
 Object . . . . . . . :   KENNETH         Owner  . . . . . . . :   QSECOFR
   Library  . . . . . :     QSYS          Primary group  . . . :   *NONE  
                                                                          
 Type changes to current authorities, press Enter.                        
                                                                          
               Object     List   -----Object------   ------Data-------    
 User         Authority   Mgt    O   M   E   A   R   R   A   U   D   E    
 QSECOFR      *ALL         X     X   X   X   X   X   X   X   X   X   X    
 KKH          *CHANGE            X                   X   X   X   X   X    
 *PUBLIC      *EXCLUDE                                                    
 

As you can see, any object associated with this authority list will have a *PUBLIC authority of *EXCLUDE, while users KKH and QSECOFR (or members of their groups if these are group profiles) will have *CHANGE and *ALL authority respectively.

What is wonderful about this is that by controlling all the authority setting for a group of objects using an authority list you only have to change this one list to change the access to *ALL of these objects!

To associate an object with an authority list modify the following field from the EDTOBJAUT display:

                            Edit Object Authority                          
                                                                           
Object . . . . . . . :   ADOPTION        Owner  . . . . . . . :   QSECOFR  
  Library  . . . . . :     KENNETH       Primary group  . . . :   *NONE    
Object type  . . . . :   *QRYDFN         ASP device . . . . . :   *SYSBAS  
                                                           

Type changes to current authorities, press Enter.xc

Object secured by authorization list . . . . . . . . . . . . *NONE

To use the authority set in the authority list for *PUBLIC authority, change the *PUBLIC entry from the EDTOBJAUT display as follows:

         Edit Object Authority                          
                                                                           
Object . . . . . . . :   ADOPTION        Owner  . . . . . . . :   QSECOFR  
  Library  . . . . . :     KENNETH       Primary group  . . . :   *NONE    
Object type  . . . . :   *QRYDFN         ASP device . . . . . :   *SYSBAS  
                                                                           
Type changes to current authorities, press Enter.                          
                                                                           
  Object secured by authorization list  . . . . . . . . . . . .   KENNETH    
                                                                           
                           Object     -----Object------   ------Data-------
User         Group        Authority   O   M   E   A   R   R   A   U   D   E
*GROUP       QSECOFR      *ALL        X   X   X   X   X   X   X   X   X   X
*PUBLIC                   *AUTL  
   

Whenever an object is created in this library specify authority as:
AUT('autl_name') or from a Save Query
screen, Authority . . . . . 'autl_name'

Sometime you may want to reset the authority for all the objects in a library so they reference an authority list. Here are the commands you would want to use in a program:

First: Remove all authority:

 
 
 
    RVKOBJAUT    OBJ(librqry/*ALL)
                 OBJTYPE(*ALL) 
                 USER(*ALL)      
                 AUT(*ALL) /* Revoke all private authority */

        GRTOBJAUT   OBJ(librqry/*ALL) 
                OBJTYPE(*ALL) 
                AUTL(*NONE) /* Remove all authority list references */

Second:

 
 
                   /* *********************************** */     
                   /* SET AUTHORITY FOR ALL OBJECTS IN    */     
                   /*  THE LIBRARY TO REFERENCE AN        */     
                   /*  AUTHORITY LIST                     */     
                   /* *********************************** */     
            
            GRTOBJAUT   OBJ(librqry/*ALL) 
                        OBJTYPE(*ALL)          
                        AUTL(CISPRDDTA)                         
                               
            GRTOBJAUT   OBJ(librqry/*ALL) 
                        OBJTYPE(*ALL)          
                        USER(*PUBLIC) 
                        AUT(*AUTL) 
                        REPLACE(*YES) 

Hopefully using these commands and securing your objects using an authority list will allow you to effectively control access to all the objects in your library!


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Past Releases
iSeries i5/OS: Top 10 Q&As
iSeries i5/OS: Top 10 Q&As
Error message within the printer file
How often are message queues cleared?
Connect the dots: Get your iSeries servers talking to one another
Embedding SQL into RPG LE programs
In search of a table that shows system & O/S release compatibility
V5R3 view disk IOA cache battery expiration
New option within the WRKSYSACT command
Copy a spoolfile (report) into the IFS as a .txt file

Upgrading
Learn the i: iSeries DevCon coming up in Orlando
System i blades not selling yet, it seems
ISV lures art company away from HP to iSeries
iSeries i5/OS: Top 10 Q&As
iSeries i5/OS: Top 10 Q&As
IBM cuts prices for System i Enterprise, HA servers
Readers respond to pending V5R4 release
SAP-friendly iSeries lowers ERP barriers
In search of a table that shows system & O/S release compatibility
New option within the WRKSYSACT command

Documentation
How database views get deleted from AS/400 libraries
Print private authorities (PRTPVTAUT) command for user objects in a library with *public exclude
iSeries i5/OS: Top 10 Q&As
iSeries i5/OS: Top 10 Q&As
New, undocumented Query function can boost your productivity
New option within the WRKSYSACT command
If at first you don't succeed, read the documentation
Copy a spoolfile (report) into the IFS as a .txt file
Limit command line access
Upgrade from V5R1 to V5R3 and license validation

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
AS/400  (Search400.com)
i5/OS  (Search400.com)
iSeries  (Search400.com)
OS/400  (Search400.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



iSeries Networking - Printing, Remote Access, TCP/IP
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts