Courseiva
User and Group Management →mediumMultiple Choice

LFCS User and Group Management Practice Question

A large company needs to create 100 user accounts from a list of names in a CSV file. Which tool is most efficient for batch user creation?

⚠ Common exam trap

Candidates often think a `for loop with useradd` is the most flexible approach, but the LFCS exam emphasizes efficiency and built-in tools, making `newusers` the correct choice for batch operations over scripting a loop.

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

✓

newusers

The `newusers` command is the most efficient tool for batch user creation because it reads a file in a specific format (username:password:UID:GID:comment:home_directory:shell) and can create multiple user accounts in a single pass, automatically handling password hashing and home directory creation. This avoids the overhead of scripting loops and multiple `useradd` invocations, making it ideal for bulk operations like creating 100 accounts from a CSV list.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    vipw

    Why it's wrong here

    vipw opens /etc/passwd in a locked editor for manually amending one entry at a time; it cannot parse a CSV or create 100 accounts. It is tempting because it edits the user database safely, so it would be correct for correcting a single malformed passwd entry, not batch creation.

  • ✗

    for loop with useradd

    Why it's wrong here

    A for loop with useradd works but requires hand-written parsing, error handling and password logic for 100 accounts. Newusers reads a colon-delimited batch file directly and creates accounts in one pass, which is the purpose-built tool for bulk creation.

  • ✓

    newusers

    Why this is correct

    `newusers` reads a plain-text file of colon-separated records and creates each account in one pass, satisfying the CSV batch requirement without scripting loops. It also sets passwords from the same file, unlike `useradd`, which handles a single account per invocation and would need 100 separate calls.

  • ✗

    pwconv

    Why it's wrong here

    pwconv synchronises /etc/passwd and /etc/shadow password entries; it creates no accounts and cannot read a CSV. It is tempting because it manipulates user account files, so it would be the correct tool when repairing mismatched password or shadow database entries, not for bulk provisioning.

About these practice questions

This LFCS question is part of Courseiva's 406-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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This LFCS practice question is part of Courseiva's free Linux Foundation 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 LFCS exam.