Question 474 of 513
Essential CommandsmediumMultiple ChoiceObjective-mapped

Quick Answer

The correct answer is to add the user to the shadow group using `usermod -aG shadow user1`. This works because `/etc/shadow` is typically owned by `root:shadow` with permissions `640` (rw-r-----), meaning members of the shadow group already have group-level read access without altering the file’s permissions or group ownership. On the LFCS exam, this scenario tests your understanding of Linux discretionary access control (DAC) and the principle of least privilege—specifically, how supplementary group membership can grant access without modifying file metadata. A common trap is assuming you must change the file’s permissions or use sudo, but the question explicitly forbids changing permissions or group. The `-aG` flag is critical because it appends the user to the group without removing existing supplementary memberships. Memory tip: think “append, not replace”—the `-a` in `usermod -aG` ensures you add, not overwrite.

LFCS Essential Commands Practice Question

This LFCS practice question tests your understanding of essential commands. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Exhibit

Refer to the exhibit.

$ ls -l /etc/shadow
-rw-r----- 1 root shadow 1234 Jan 15 10:00 /etc/shadow
$ id
uid=1000(user1) gid=1000(user1) groups=1000(user1)
$ cat /etc/shadow
cat: /etc/shadow: Permission denied

A user with uid 1000 tries to read /etc/shadow and gets 'Permission denied'. The user is not in the shadow group. Which of the following actions would allow the user to read the file without changing the file's group or permissions?

Question 1mediummultiple choice
Full question →

Exhibit

Refer to the exhibit.

$ ls -l /etc/shadow
-rw-r----- 1 root shadow 1234 Jan 15 10:00 /etc/shadow
$ id
uid=1000(user1) gid=1000(user1) groups=1000(user1)
$ cat /etc/shadow
cat: /etc/shadow: Permission denied

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

Add user1 to the shadow group using usermod -aG shadow user1

Option C is correct because adding user1 to the shadow group grants group-level read access to /etc/shadow without altering the file's permissions or group ownership. The file is typically owned by root:shadow with permissions 640 (rw-r-----), so members of the shadow group can read it. The usermod -aG command appends the user to the supplementary group, preserving existing group memberships.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

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

  • Set an ACL using setfacl to grant user1 read access

    Why it's wrong here

    This would work but is not listed as an option; also it changes the file's ACL, which is not 'without changing file's group or permissions'.

  • Use chmod o+r /etc/shadow as root

    Why it's wrong here

    This changes permissions, which is not allowed per the question.

  • Add user1 to the shadow group using usermod -aG shadow user1

    Why this is correct

    Correct: adding to shadow group gives read access via group permission.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Change the file owner to user1 using chown

    Why it's wrong here

    Only root can change ownership.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often assume ACLs (setfacl) are not a 'permission change' and select option A, but ACLs are indeed a form of permission modification and violate the constraint, while group membership addition is a user attribute change, not a file attribute change.

Detailed technical explanation

How to think about this question

Under the hood, /etc/shadow typically has permissions 640 (owner root, group shadow) to restrict access to the hashed password field. The shadow group is a system group specifically created to allow certain processes (like PAM modules) or users to read shadow data without exposing it to all users. In real-world scenarios, services like Dovecot or Samba may require shadow group membership to authenticate users, and using ACLs or chmod would weaken security by granting broader access than intended.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A security administrator must allow nursing staff to reach a patient records server while blocking access from the guest Wi-Fi VLAN. After applying an extended ACL, traffic is still blocked from nursing workstations. The ACL was applied outbound instead of inbound on the wrong interface. Questions like this test ACL direction and placement rules.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related LFCS practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free LFCS practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this LFCS question test?

Essential Commands — This question tests Essential Commands — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Add user1 to the shadow group using usermod -aG shadow user1 — Option C is correct because adding user1 to the shadow group grants group-level read access to /etc/shadow without altering the file's permissions or group ownership. The file is typically owned by root:shadow with permissions 640 (rw-r-----), so members of the shadow group can read it. The usermod -aG command appends the user to the supplementary group, preserving existing group memberships.

What should I do if I get this LFCS question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.