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:
Run these commands on the CL command line:
CHGAUT OBJ('/QIBM/ProdData/WebASE51/ASE/bin/startServer') USER(USERID) DTAAUT(*RX)
CHGUSRPRF USRPRF(userid) SPCAUT(*JOBCTL)
GRTOBJAUT OBJ(QASE51/STRSVRWAIT) OBJTYPE(*PGM) USER(USERID) AUT(*USE)
GRTOBJAUT OBJ(QASE51/QASE51) OBJTYPE(*JOBD) USER(USERID) AUT(*USE)
GRTOBJAUT OBJ(QASE51/QASE51) OBJTYPE(*JOBQ) USER(USERID) AUT(*USE)
GRTOBJAUT OBJ(QSYS/QEJBSVR) OBJTYPE(*USRPRF) USER(USERID) AUT(*USE)
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.
Run the Start Qshell (STRQSH) command from the CL command line.
In Qshell, run these commands:
/QIBM/ProdData/WebASE51/ASE/bin/grtwasaut -instance instance -user userid -dtaaut rx
/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:
/QIBM/ProdData/WebASE51/ASE/bin/startServer -instance instance -nowait
This command starts the default server (instance) for instance instance.
SBMJOB CMD(CALL PGM(QEJBAS5/QASESTRSVR) PARM('-instance' '/QIBM/UserData/WebASE51/ASE/instance' '-server' 'server')) JOB(server) JOBD(QASE51/QASE51) JOBQ(QASE51/QASE51) USER(QEJBSVR) LANGID(*USRPRF) CNTRYID(*USRPRF) CCSID(*USRPRF)
where instance is the name of the instance and servername is the name of the server.
This command starts the default server (instance) for instance instance.
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
Set authorities for the stopServer script
To set explicit authorities for the stopServer script, follow these steps:
On the CL command line, run this command:
CHGAUT OBJ('/QIBM/ProdData/WebASE51/ASE/bin/stopServer') USER(USERID) DTAAUT(*RX)
Run the Start Qshell (STRQSH) command from the CL command line.
In Qshell, run these commands:
/QIBM/ProdData/WebASE51/ASE/bin/grtwasaut -instance instance -user userid -dtaaut rx
/QIBM/ProdData/WebASE51/ASE/bin/grtwasaut -instance instance -user userid -dtaaut rx -object bin -recursive
/QIBM/ProdData/WebASE51/ASE/bin/grtwasaut -instance instance -user userid -dtaaut rx -object properties
/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.