Bird
0
0

What happens if a user without sudo rights runs sudo cat /etc/shadow?

medium📝 Command Output Q5 of 15
Linux CLI - Users and Groups
What happens if a user without sudo rights runs sudo cat /etc/shadow?
APermission denied error
BThe file contents are displayed
CCommand runs as normal user
DSystem crashes
Step-by-Step Solution
Solution:
  1. Step 1: Understand sudo rights requirement

    Only users with sudo rights can run commands with sudo.

  2. Step 2: Effect of no sudo rights

    Without sudo rights, the command fails with a permission denied error.

  3. Final Answer:

    Permission denied error -> Option A
  4. Quick Check:

    no sudo rights = permission denied [OK]
Quick Trick: No sudo rights means command denied [OK]
Common Mistakes:
MISTAKES
  • Expecting command to run anyway
  • Thinking system crashes
  • Assuming normal user can read shadow file

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes