Bird
0
0

A script uses usermod -aG sudo bob but 'bob' still cannot run sudo commands. What is the problem?

medium📝 Debug Q7 of 15
Linux CLI - Users and Groups
A script uses usermod -aG sudo bob but 'bob' still cannot run sudo commands. What is the problem?
AThe user must log out and back in for group changes to apply
BThe command syntax is wrong; -aG should be -AG
CThe sudo package is not installed
DThe usermod command does not add groups
Step-by-Step Solution
Solution:
  1. Step 1: Confirm correct command usage

    'usermod -aG sudo bob' correctly adds 'bob' to sudo group.
  2. Step 2: Understand group membership update

    Group changes require the user to log out and back in to take effect.
  3. Final Answer:

    The user must log out and back in for group changes to apply -> Option A
  4. Quick Check:

    Group update requires re-login = C [OK]
Quick Trick: User must re-login after group changes [OK]
Common Mistakes:
  • Mistaking command syntax
  • Assuming sudo package missing
  • Believing usermod can't add groups

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes