Use the MAY command to query the AUTHORIZ CONFIG file.
MAY [userid [authword ...]]
Specifies the user ID whose authorizations you want CA VM:Director 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:Director authorizations.
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
vmdirect may junior chgmdisk anyusr
vmdirect may anyusr manage everyusr
vmdirect 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.
|
|