Set explicit authorities for the startServer and stopServer scripts

You can set explicit authorities to allow a user profile to start and stop application servers even if the profile does not have *ALLOBJ authority. When you set these authorities for a user profile, that user profile can also use the HTTP Administration forms to start and stop application servers.

Note: In the steps below, userid is the user profile for which you want to set the authorities.

Set authorities for the startServer script

To set explicit authorities for the startServer script, follow these steps:

  1. Run these commands on the CL command line:

    1. CHGAUT OBJ('/QIBM/ProdData/WebASE51/ASE/bin/startServer') USER(USERID) DTAAUT(*RX)
    2. CHGUSRPRF USRPRF(userid) SPCAUT(*JOBCTL)
    3. GRTOBJAUT OBJ(QASE51/STRSVRWAIT) OBJTYPE(*PGM) USER(USERID) AUT(*USE)
    4. GRTOBJAUT OBJ(QASE51/QASE51) OBJTYPE(*JOBD) USER(USERID) AUT(*USE)
    5. GRTOBJAUT OBJ(QASE51/QASE51) OBJTYPE(*JOBQ) USER(USERID) AUT(*USE)
    6. GRTOBJAUT OBJ(QSYS/QEJBSVR) OBJTYPE(*USRPRF) USER(USERID) AUT(*USE)
    7. If QEJBSVR is not authorized to the output queue of the userid user profile, you must grant QEJBSVR *USE authority to the output queue:

      GRTOBJAUT OBJ(outqlib/outqname) OBJTYPE(*OUTQ) USER(QEJBSVR) AUT(*USE)

      If you do not want to grant explicit authority to the user's output queue, create an output queue to which QEJBSVR is authorized and use the SBMJOB CL command to start the server. Specify the appropriate value for the OUTQ parameter on the SBMJOB command.

  2. Run the Start Qshell (STRQSH) command from the CL command line.

  3. In Qshell, run these commands:

    1. /QIBM/ProdData/WebASE51/ASE/bin/grtwasaut -instance instance -user userid 
        -dtaaut rx
    2. /QIBM/ProdData/WebASE51/ASE/bin/grtwasaut -instance instance -user userid
        -dtaaut rx -object bin -recursive

After you perform these steps, the user profile can start the server from Qshell with either of these commands:

Note: The givedescriptor API used by The STRSVRWAIT program uses the givedescriptor API. This API requires *ALLOBJ in certain situations. As a result, if your user profile does not have *ALLOBJ authority, you must include the -nowait parameter when you run the startServer script.

Set authorities for the stopServer script

To set explicit authorities for the stopServer script, follow these steps:

  1. On the CL command line, run this command:

    CHGAUT OBJ('/QIBM/ProdData/WebASE51/ASE/bin/stopServer') USER(USERID) DTAAUT(*RX)
  2. Run the Start Qshell (STRQSH) command from the CL command line.

  3. In Qshell, run these commands:

    1. /QIBM/ProdData/WebASE51/ASE/bin/grtwasaut -instance instance -user userid
        -dtaaut rx
    2. /QIBM/ProdData/WebASE51/ASE/bin/grtwasaut -instance instance -user userid
        -dtaaut rx -object bin -recursive
    3. /QIBM/ProdData/WebASE51/ASE/bin/grtwasaut -instance instance -user userid
        -dtaaut rx -object properties
    4. /QIBM/ProdData/WebASE51/ASE/bin/grtwasaut -instance instance -user userid
        -dtaaut rx -object properties/java.security

After you perform these steps, the user profile can run this command from Qshell to stop the server:

/QIBM/ProdData/WebASE51/ASE/bin/stopServer -instance instance

This command stops the default server (instance) for instance instance.