Bird
0
0

Which of the following commands correctly locks a user account named 'bob' to prevent login?

easy📝 Syntax Q3 of 15
Linux CLI - Users and Groups
Which of the following commands correctly locks a user account named 'bob' to prevent login?
Auseradd -l bob
Bpasswd -l bob
Cusermod -u bob
Dpasswd -u bob
Step-by-Step Solution
Solution:
  1. Step 1: Identify command to lock account

    The 'passwd -l username' command locks the user account by disabling the password.
  2. Step 2: Check other options

    'useradd' adds users, 'usermod -u' changes UID, 'passwd -u' unlocks accounts.
  3. Final Answer:

    passwd -l bob -> Option B
  4. Quick Check:

    Lock user command = B [OK]
Quick Trick: Use 'passwd -l username' to lock accounts [OK]
Common Mistakes:
  • Confusing useradd with locking
  • Using passwd -u which unlocks accounts
  • Misusing usermod for locking

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes