Using the access authorization commands on IBM i
Use this information to learn about the access authorization commands, and use the command examples.
Using the GRTMQMAUT command
If you have the required authorization, you can use the GRTMQMAUT command to grant authorization of a user profile or user group to access a particular object. The following examples illustrate how the GRTMQMAUT command is used:
-
GRTMQMAUT OBJ(RED.LOCAL.QUEUE) OBJTYPE(*LCLQ) USER(GROUPA) + AUT(*BROWSE *PUT) MQMNAME('saturn.queue.manager')In this example:RED.LOCAL.QUEUEis the object name.*LCLQ(local queue) is the object type.GROUPAis the name of a user profile on the system for which authorizations are to change. This profile can be used as a group profile for other users.*BROWSEand*PUTare the authorizations being granted to the specified queue.*BROWSEadds authorization to browse messages on the queue (to issue MQGET with the browse option).*PUTadds authorization to put (MQPUT) messages on the queue.saturn.queue.manageris the queue manager name.
- The following command grants to users JACK and JILL all applicable authorizations, to all
process definitions, for the default queue manager.
GRTMQMAUT OBJ(*ALL) OBJTYPE(*PRC) USER(JACK JILL) AUT(*ALL) - The following command grants user
GEORGEauthority to put a message on the queueORDERS, on the queue managerTRENT.GRTMQMAUT OBJ(TRENT) OBJTYPE(*MQM) USER(GEORGE) AUT(*CONNECT) MQMNAME (TRENT) GRTMQMAUT OBJ(ORDERS) OBJTYPE(*Q) USER(GEORGE) AUT(*PUT) MQMNAME (TRENT)
Using the RVKMQMAUT command
If you have the required authorization, you can use the RVKMQMAUT command to remove previously granted authorization of a user profile or user group to access a particular object. The following examples illustrate how the RVKMQMAUT command is used:
-
The authority to put messages to the specified queue, that was granted in the previous example, is removed forRVKMQMAUT OBJ(RED.LOCAL.QUEUE) OBJTYPE(*LCLQ) USER(GROUPA) + AUT(*PUT) MQMNAME('saturn.queue.manager')GROUPA. -
Authority to get messages from any queue with a name starting with the charactersRVKMQMAUT OBJ(PAY*) OBJTYPE(*Q) USER(*PUBLIC) AUT(*GET) + MQMNAME(PAYROLLQM)PAY, owned by queue managerPAYROLLQM, is removed from all users of the system unless they, or a group to which they belong, have been separately authorized.
Using the DSPMQMAUT command
The display MQM authority ( DSPMQMAUT ) command shows, for the
specified object and user, the list of authorizations that the user has for the object. The
following example illustrates how the command is used:
DSPMQMAUT OBJ(ADMINNL) OBJTYPE(*NMLIST) USER(JOE) OUTPUT(*PRINT) +
MQMNAME(ADMINQM)
Using the RFRMQMAUT command
The refresh MQM security ( RFRMQMAUT ) command enables you to update
the OAM's authorization group information immediately, reflecting changes made at the operating
system level, without needing to stop and restart the queue manager. The following example
illustrates how the command is used:
RFRMQMAUT MQMNAME(ADMINQM)