• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Some Questions on Adopted Authority Programs

    November 11, 2009 Hey, Joe

    I compiled your PSSWRDCHG program to change user passwords on the fly and modified it with your follow-up information. When we compiled it the normal way, authorized users couldn’t change passwords. We then compiled the program under QSECOFR with the User Profile parameter equal to *OWNER. It worked fine, but doesn’t compiling the program this way allow users with command line access to execute the program?

    –Mark

    Thanks for writing. This sounds like you have two questions about compiling programs with *OWNER adopted authority.

    1. Does compiling a program with the adopted authority of the QSECOFR user profile allow any user with command line access to run that program?
    2. How can you tell if a program is compiled with the adopted authority of the program owner?

    Regarding the first question, when you set *PUBLIC authority to *EXCLUDE, it prevents anyone who isn’t explicitly authorized to run the program from accessing it. With *PUBLIC *EXCLUDE authority, you don’t have to worry because even if an unauthorized user has command line access, they won’t be able to run the program unless you explicitly change the object’s authorization list to provide access for them.

    For example, I can use the following Edit Object Authority (EDTOBJAUT) command to view authorities for my version of the PSSWRDCHG program.

    EDTOBJAUT OBJ(QGPL/PSSWRDCHG) OBJTYPE(*PGM)
    

    This command would show me a screen that looks something like this.

                                Edit Object Authority
    
    Object . . . . . . . :   PSSWRDCHG       Owner  . . . . . . . :   QSECOFR
      Library  . . . . . :     QGPL          Primary group  . . . :   *NONE
    Object type  . . . . :   *PGM            ASP device . . . . . :   *SYSBAS
    
    Type changes to current authorities, press Enter.
    
      Object secured by authorization list  . . . . . . . . . . . .   *NONE
    
                             Object
    User        Group       Authority
    *PUBLIC                 *EXCLUDE
    JOEH                    *ALL
    USER1                   *USE
    USER2                   *USE
    USER3                   *USE
    

    If you have *PUBLIC *EXCLUDE listed for your object as shown here, no unauthorized users will be able to run the program. Adding *PUBLIC access to your object authority list designates what action the operating system will take if the requesting user isn’t explicitly defined in the rest of the authorization list. In this case, it doesn’t matter if the user can get to the command line. They still won’t be able to run the program to change passwords if they aren’t explicitly authorized to use it. The only thing you have to be careful of is to make sure to add any users to the authorization list that you want to be able to run the program. You can find instructions for adding users to the program’s authorization list in my original article.

    However, all bets are off if the users you are worried about have *ALLOBJ authority. A user with All Object (*ALLOBJ) authority can get to anything on your partition, even if you’ve secured it against *PUBLIC access. So if you’re being stingy with *ALLOBJ authority, you shouldn’t have too much to worry about with this program. But if a user possesses *ALLOBJ authority, they can also probably use the Work with User Profile (WRKUSRPRF) and Change User Profile (CHGUSRPRF) commands to change passwords and bypass running the PSSWRDCHG program altogether.

    Regarding the second question, if you’re unsure whether your PSSWRDCHG program is compiled using adopted authority (which specifies that i5/OS authority checking allows object access by using both the authority settings of the individual user calling the program as well as the authority settings of the program owner), you can run this Display Program Information (DSPPGM) command to determine what the program’s adopted authority setting is.

    DSPPGM PGM(QGPL/PSSWRDCHG)
    

    Running this command displays a screen similar to this one.

                             Display Program Information
                                                                    Display 1 of 7
    Program  . . . . . . . :   PSSWRDCHG     Library  . . . . . . . :   QGPL
    Owner  . . . . . . . . :   QSECOFR
    Program attribute  . . :   CLP
    Detail . . . . . . . . :   *BASIC
    
    
    Program creation information:
      Program creation date/time . . . . . . . . . . :   12/03/07  14:16:56
      Type of program  . . . . . . . . . . . . . . . :   ILE
      Program entry procedure module . . . . . . . . :   PSSWRDCHG
        Library  . . . . . . . . . . . . . . . . . . :     QTEMP
      Activation group attribute . . . . . . . . . . :   *DFTACTGRP
      Shared activation group  . . . . . . . . . . . :   *NO
      User profile . . . . . . . . . . . . . . . . . :   *OWNER
      Use adopted authority  . . . . . . . . . . . . :   *YES
      Coded character set identifier . . . . . . . . :   65535
      Number of modules  . . . . . . . . . . . . . . :   1
    

    Check the User Profile parameter on this screen to determine whether the program was compiled to use the adopted authority of the program owner. If the User Profile parameter listed here equals *OWNER, then i5/OS will run the program using both the running user’s object authorities plus the program owner’s object authorities (i.e., the running user adds, or adopts, the authority of the program owner to his own authority). In this example, the program owner is the QSECOFR user profile. So while the user is running PSSWRDCHG, the user will be able to run all the commands and features of the program using his own and the QSECOFR user’s object authorities. This additional authority is only temporary while the user is running the program, and he loses those extra authorities the minute he exits the program.

    If the DSPPGM User Profile parameter is equal to *USER, i5/OS will only check the user’s authority settings when he goes to run the program. No additional authorities are given to the user when he runs the program. *USER is the default settings for the User Profile parameter for compile commands inside the i5/OS environment.

    HTH

    –Joe

    RELATED STORIES

    Changing User Passwords on the Fly

    Correcting and Expanding the Program to Change User Passwords on the Fly



                         Post this story to del.icio.us
                   Post this story to Digg
        Post this story to Slashdot

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags:

    Sponsored by
    Midrange Dynamics North America

    With MDRapid, you can drastically reduce application downtime from hours to minutes. Deploying database changes quickly, even for multi-million and multi-billion record files, MDRapid is easy to integrate into day-to-day operations, allowing change and innovation to be continuous while reducing major business risks.

    Learn more.

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Sponsored Links

    Vision Solutions:  Free software for measuring overall i5/OS system health
    Profound Logic Software:  FREE Webinar, Nov 17. Learn how to easily build and extend i apps
    Manta Technologies:  Your complete source for IBM i training

    IT Jungle Store Top Book Picks

    Easy Steps to Internet Programming for AS/400, iSeries, and System i: List Price, $49.95
    The iSeries Express Web Implementer's Guide: List Price, $49.95
    The System i RPG & RPG IV Tutorial and Lab Exercises: List Price, $59.95
    The System i Pocket RPG & RPG IV Guide: List Price, $69.95
    The iSeries Pocket Database Guide: List Price, $59.00
    The iSeries Pocket SQL Guide: List Price, $59.00
    The iSeries Pocket Query Guide: List Price, $49.00
    The iSeries Pocket WebFacing Primer: List Price, $39.00
    Migrating to WebSphere Express for iSeries: List Price, $49.00
    Getting Started With WebSphere Development Studio Client for iSeries: List Price, $89.00
    Getting Started with WebSphere Express for iSeries: List Price, $49.00
    Can the AS/400 Survive IBM?: List Price, $49.00
    Chip Wars: List Price, $29.95

    UC4 Software Delivers Graphical View of Job Flows System for Sale Versus Service for Rent

    Leave a Reply Cancel reply

Volume 9, Number 35 -- November 11, 2009
THIS ISSUE SPONSORED BY:

Halcyon Software
ProData Computer Services
RJS Software Systems

Table of Contents

  • Enable Row Set Paging in a Client/Server Environment Using SQL
  • The Case of the Used Unused Object: A Mystery
  • Some Questions on Adopted Authority Programs
  • Enhancing CGIDEV2
  • A Quick-and-Easy Way to Convert Case in RPG Programs
  • Admin Alert: Keeping i5/OS Ethernet Lines Connected

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • Meet The Next Gen Of IBMers Helping To Build IBM i
  • Looks Like IBM Is Building A Linux-Like PASE For IBM i After All
  • Will Independent IBM i Clouds Survive PowerVS?
  • Now, IBM Is Jacking Up Hardware Maintenance Prices
  • IBM i PTF Guide, Volume 27, Number 24
  • Big Blue Raises IBM i License Transfer Fees, Other Prices
  • Keep The IBM i Youth Movement Going With More Training, Better Tools
  • Remain Begins Migrating DevOps Tools To VS Code
  • IBM Readies LTO-10 Tape Drives And Libraries
  • IBM i PTF Guide, Volume 27, Number 23

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle