Use the MAY command to query the AUTHORIZ CONFIG file.
MAY [userid [authword ...]]
Specifies the user ID whose authorizations you want CA 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.
Specifies a list of authority words that describe the authorization to query. You can specify any authority, or any of the authority variables described under the LISTAUTH command.
The default for each authority word is ANYWRD.
Note: 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.
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 CA VM:Secure authorizations.
The difference between the MAY command and the CAN command (CA VM:Secure only) is that the MAY command queries authorizations in the AUTHORIZ CONFIG file to use CA VM:Secure commands and the CAN command queries authorizations in the CA VM:Secure rules database to use CP, CA VM:Schedule, and CA VM:Tape commands.
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
vmsecure may junior chgmdisk anyusr
vmsecure may anyusr manage everyusr
vmsecure may i expire smith
Note: For information about how to find all authorizations a user ID has for a command or function, see LISTAUTH Command.
|
Copyright © 2014 CA.
All rights reserved.
|
|