Use this procedure to create command rules to permit or deny users in a user group from using certain commands.
Use this procedure to create command rules that control which commands users can read and execute.
Command rules are guidelines you can define for a user group to permit or deny access to specific commands. You can associate command rules with a user group and apply them to all users in that group.
You can create a command rule by specifying whether to permit or deny an operation on a command.
This table lists the possible operation and permission combinations.
| Operation | Accept permission | Reject permission |
|---|---|---|
| Read (R) | Displays command on the CLI when you enter "?" from the CLI | Does not display command on the CLI when you enter "?" from the CLI |
| Execute (X) | Executes command from the CLI | Cannot execute command from the CLI |
| Read and execute (RX) | Displays command on the CLI and can execute command | Command is not visible or executable from the CLI |
Permissions are set to reject by default.
Each command rule is identified by an associated number. When you apply multiple command rules to a user group, the command rule with a lower number takes precedence. For example, cmdrule5 permits read access, while cmdrule10 rejects read access. When both these command rules are applied to the same user group, users in this group get read access because cmdrule 5 takes precedence.
For example, you can create a command rule to deny read and execute permissions for the show platform command.
Before you begin
Create a user group. For details, see Create a user group.
Procedure
What to do next
Create data rules. See Create data rules for details.