MAY Command

Use the MAY command to query the AUTHORIZ CONFIG file.
vmx32besp
Use the MAY command to query the AUTHORIZ CONFIG file.
MAY [
userid
 [
authword
 ...]]
Definitions
  • userid
    Specifies the user ID whose authorizations you want
    VM:Secure
    to query. You can specify a user ID by name if you are authorized to query that user ID, or any of the variable user IDs described under the LISTAUTH command.
    The default user ID is I.
  • authword .
    ..
    Specifies a list of authority words that describe the authorization to query. You can specify any authority listed in Authorization to Use Ca VM:Secure Commands and Utilities, or any of the authority variables described under the LISTAUTH command.
    The default for each authority word is ANYWRD.
    The default authority word for the MAY command is ANYWRD, while the default authority word for the LISTAUTH command is EVERYWRD. These different default values can produce different results for the LISTAUTH and MAY commands, even though their functions are similar. For more information, see Authorization to Use
    VM:Secure
    Commands and Utilities
    .
Description
The MAY command lets you query the AUTHORIZ CONFIG file to determine whether a user ID has a specific authorization. This command always returns a code of 0 or 8. It does not stack any data. You can use this command in programs that check
VM:Secure
authorizations. The difference between the MAY command and the CAN command is that the MAY command queries authorizations in the AUTHORIZ CONFIG file to use
VM:Secure
commands and the CAN command queries authorizations in the
VM:Secure
rules database to use CP,
VM:Schedule
, and
VM:Tape
commands.
Return Codes
The following table describes the return codes:
Return Code
Meaning
0
User ID is authorized to perform the function
8
User ID is not authorized to perform the function
Examples
  • To determine whether JUNIOR is allowed to issue the CHGMDISK command for any user IDs, enter:
    vmsecure
    may junior chgmdisk anyusr
  • To determine whether any user has been given authority to manage every other user ID, enter:
    vmsecure
    may anyusr manage everyusr
  • To check whether you can use the EXPIRE command on user ID SMITH, enter:
    vmsecure
    may i expire smith
For information about how to find all authorizations a user ID has for a command or function, see LISTAUTH Command.