The correct statement is:
A. If you allow and deny the same command, the command is denied.
When configuring custom login class permissions in Junos OS, if you explicitly allow and deny the same command within the same login class, the deny action takes precedence. This means that the command will be denied for users belonging to that login class, even if it is explicitly allowed elsewhere in the configuration. The deny action overrides the allow action for the specific command.
set system login class myclass allow-commands "show interfaces"
set system login class myclass deny-commands "show interfaces"
the command will be allowed
Ref: User Access Privileges | Junos OS | Juniper Networks
“User Access Privileges
…
Understanding the Allow and Deny Statement Precedence and Matching
By default, the allow-commands and allow-configuration regular expressions take precedence over deny-commands and deny-configuration expresssions. Thus, if you configure the same command for both the allow-commands and deny-commands statements, then the allow operation takes precedence over the deny operation.
..,.”
Answer: C
C is correct:
Understanding the Allow and Deny Statement Precedence and Matching
By default, the allow-commands and allow-configuration regular expressions take precedence over deny-commands and deny-configuration expresssions. Thus, if you configure the same command for both the allow-commands and deny-commands statements, then the allow operation takes precedence over the deny operation.
A is the correct answer. https://supportportal.juniper.net/s/article/Understanding-access-privileges-in-operational-and-configuration-mode?language=en_US
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Cradical
1 year, 6 months agoEngNawaf
1 year, 7 months agoJienex
1 year, 7 months agojj970us
1 year, 10 months agoGreatDane
1 year, 11 months agoAidar5
2 years ago_muxa_
2 years agojj970us
2 years, 1 month agojj970us
2 years, 1 month agomisu112
2 years, 1 month agoMunrra
2 years, 2 months agoaisa007
2 years ago