LPIC-1 Shells, Scripting and Data Management Practice Question
Exhibit
{
"allow": [{"action": "execute", "path": "/usr/bin/*"}],
"deny": [{"action": "execute", "path": "/usr/bin/passwd"}]
}Refer to the exhibit. An application uses this JSON policy to control execution of commands. If a user tries to run /usr/bin/passwd, what will happen?
⚠ Common exam trap
Watch out — candidates often assume the allow rule's wildcard `*` always grants access, ignoring that a more specific deny rule takes precedence over a broader allow rule.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Denied because the deny rule is more specific.
The deny rule is more specific than the allow rule. In this JSON policy, the deny rule explicitly matches the exact path `/usr/bin/passwd`, while the allow rule uses a wildcard pattern `*` that matches all commands. When a more specific rule (deny) conflicts with a less specific rule (allow), the more specific rule takes precedence, so the execution is denied.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Denied because the deny rule is more specific.
Why this is correct
The deny rule explicitly blocks /usr/bin/passwd, so execution is denied.
- ✗
Allowed because the allow rule matches.
Why it's wrong here
The deny rule explicitly blocks the path, overriding the allow.
- ✗
The policy is invalid due to conflicting rules.
Why it's wrong here
Conflicting rules are allowed; the deny takes precedence.
- ✗
The path pattern does not match.
Why it's wrong here
/usr/bin/passwd matches the wildcard /usr/bin/*.
Go deeper
Related to this question
About these practice questions
This LPIC-1 question is part of Courseiva's 527-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This LPIC-1 practice question is part of Courseiva's free LPI certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LPIC-1 exam.