LPI 102-500 Practice Test 18
Question 170
During an LPIC-1 practice lab, the operator encounters this condition: A compliance baseline requires a user to change their password at a defined interval, yet the operator sets only the directory's filesystem expiration date. Which TWO complementary steps provide the best corrective action and its most direct diagnostic verification? Select TWO answers.
- Inspect getent passwd for the account, stat the home directory and review useradd defaults, ownership and login shell.
- Use passwd and chage to update password or aging policy through supported account tools, preserving restricted shadow-file access.
- Inspect `getent passwd`, controlled `chage -l` output, shadow permissions and test behavior at the next authorized login.
- Define a suitable .timer with OnCalendar and Persistent when missed calendar activations should run after downtime, and enable the timer unit rather than only the service.
- Edit /etc/passwd as if it contained the shadow password hash and assume a file timestamp changes account password expiration.
Explanation
Correct Answers
B:Recommended administrative action: Use passwd and chage to update password or aging policy through supported account tools, preserving restricted shadow-file access. Linux principle: /etc/passwd stores user identity and shell information, while protected password hashes and aging fields reside in /etc/shadow on shadow-password systems.
C:Most direct verification evidence: Inspect `getent passwd`, controlled `chage -l` output, shadow permissions and test behavior at the next authorized login. Linux principle: /etc/passwd stores user identity and shell information, while protected password hashes and aging fields reside in /etc/shadow on shadow-password systems.
Incorrect Answers
A:That option would inspect getent passwd for the account, stat the home directory and review useradd defaults, ownership and login shell, but it addresses a different concern. /etc/passwd stores user identity and shell information, while protected password hashes and aging fields reside in /etc/shadow on shadow-password systems.
D:This alternative addresses Systemd timers and persistent missed schedules, not the specific issue of Shadow password entries and password aging: Define a suitable .timer with OnCalendar and Persistent when missed calendar activations should run after downtime, and enable the timer unit rather than only the service. Linux principle: /etc/passwd stores user identity and shell information, while protected password hashes and aging fields reside in /etc/shadow on shadow-password systems. Appropriate response: Use passwd and chage to update password or aging policy through supported account tools, preserving restricted shadow-file access. Root-cause evidence: Inspect `getent passwd`, controlled `chage -l` output, shadow permissions and test behavior at the next authorized login. Independent acceptance: The password is updated or expiration policy enforced as approved while shadow hashes remain inaccessible to unprivileged users.
E:This shortcut is unsafe for the present Linux issue: Edit /etc/passwd as if it contained the shadow password hash and assume a file timestamp changes account password expiration. /etc/passwd stores user identity and shell information, while protected password hashes and aging fields reside in /etc/shadow on shadow-password systems.
Question 171
A helpdesk escalation describes this Linux behavior: A developer gains access to a shared application directory but loses all existing secondary group memberships after a careless `usermod -G` command. Which administrative step is the MOST appropriate way to resolve this issue? Select ONE best answer.
- Use five time fields followed by a command in a user crontab, and include the user field only in the appropriate system crontab or /etc/cron.d format.
- Use `usermod -aG` to append supplementary group membership and distinguish that operation from `usermod -g` for a primary group.
- Use `getent` and supported user or group administration tools to inspect the effective NSS account database without assuming all identities exist in local files.
- Use `usermod -G newgroup` without `-a` and assume it appends the group while retaining all previous memberships.
Explanation
Correct Answer
B:Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships. Compare `id` and getent group output before and after changes and test a fresh login for access to both old and new groups.
Incorrect Answers
A:This alternative addresses User crontab versus system crontab fields, not the specific issue of Supplementary group membership and primary GID: Use five time fields followed by a command in a user crontab, and include the user field only in the appropriate system crontab or /etc/cron.d format. Linux principle: Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships. Appropriate response: Use `usermod -aG` to append supplementary group membership and distinguish that operation from `usermod -g` for a primary group. Root-cause evidence: Compare `id` and getent group output before and after changes and test a fresh login for access to both old and new groups. Independent acceptance: The account has the additional authorized membership while every existing required supplementary group remains intact.
C:That option would use `getent` and supported user or group administration tools to inspect the effective NSS account database without assuming all identities exist in local files, but it addresses a different concern. Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships.
D:This shortcut is unsafe for the present Linux issue: Use `usermod -G newgroup` without `-a` and assume it appends the group while retaining all previous memberships. Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships.
Question 172
An operations handoff identifies this problem: A developer gains access to a shared application directory but loses all existing secondary group memberships after a careless `usermod -G` command. Which Linux behavior or technical principle BEST explains why the issue occurs? Select ONE best answer.
- Use `usermod -G newgroup` without `-a` and assume it appends the group while retaining all previous memberships.
- cron and at can enforce distinct user-access controls, and the presence of an allow file often changes who may submit jobs.
- Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships.
- Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts.
Explanation
Correct Answer
C:Relevant Linux operating principle: Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships.
Incorrect Answers
A:This shortcut is unsafe for the present Linux issue: Use `usermod -G newgroup` without `-a` and assume it appends the group while retaining all previous memberships. Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships.
B:This alternative addresses Cron and at user-access allow deny policies, not the specific issue of Supplementary group membership and primary GID: cron and at can enforce distinct user-access controls, and the presence of an allow file often changes who may submit jobs. Linux principle: Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships. Appropriate response: Use `usermod -aG` to append supplementary group membership and distinguish that operation from `usermod -g` for a primary group. Root-cause evidence: Compare `id` and getent group output before and after changes and test a fresh login for access to both old and new groups. Independent acceptance: The account has the additional authorized membership while every existing required supplementary group remains intact.
D:This alternative addresses Name service lookups and account database integrity, not the specific issue of Supplementary group membership and primary GID: Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts. Linux principle: Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships. Appropriate response: Use `usermod -aG` to append supplementary group membership and distinguish that operation from `usermod -g` for a primary group. Root-cause evidence: Compare `id` and getent group output before and after changes and test a fresh login for access to both old and new groups. Independent acceptance: The account has the additional authorized membership while every existing required supplementary group remains intact.
Question 173
A team maintaining a Linux host reports: A developer gains access to a shared application directory but loses all existing secondary group memberships after a careless `usermod -G` command. Which evidence or command result MOST directly tests the suspected root cause? Select ONE best answer.
- Inspect `getent passwd`, controlled `chage -l` output, shadow permissions and test behavior at the next authorized login.
- Compare `id` and getent group output before and after changes and test a fresh login for access to both old and new groups.
- Review passwd status, chage or usermod lock fields, SSH key access, active sessions and retention or account-removal records.
- Use `usermod -G newgroup` without `-a` and assume it appends the group while retaining all previous memberships.
Explanation
Correct Answer
B:Most direct verification evidence: Compare `id` and getent group output before and after changes and test a fresh login for access to both old and new groups.
Incorrect Answers
A:That option would inspect `getent passwd`, controlled `chage -l` output, shadow permissions and test behavior at the next authorized login, but it addresses a different concern. Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships.
C:That option would review passwd status, chage or usermod lock fields, SSH key access, active sessions and retention or account-removal records, but it addresses a different concern. Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships.
D:This shortcut is unsafe for the present Linux issue: Use `usermod -G newgroup` without `-a` and assume it appends the group while retaining all previous memberships. It cannot establish a safe correction. Linux principle: Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships.
Question 174
While verifying a Linux change request, an engineer finds: A developer gains access to a shared application directory but loses all existing secondary group memberships after a careless `usermod -G` command. Which observed outcome BEST confirms a successful and properly scoped correction? Select ONE best answer.
- The deactivated account cannot start unauthorized sessions, and retained data is handled according to approved policy.
- The account has the additional authorized membership while every existing required supplementary group remains intact.
- Use `usermod -G newgroup` without `-a` and assume it appends the group while retaining all previous memberships.
- System applications display the configured local zone while UTC instant and time synchronization remain consistent.
Explanation
Correct Answer
B:Observable acceptance criterion: The account has the additional authorized membership while every existing required supplementary group remains intact.
Incorrect Answers
A:This alternative addresses Account locking suspension and safe removal, not the specific issue of Supplementary group membership and primary GID: The deactivated account cannot start unauthorized sessions, and retained data is handled according to approved policy. Linux principle: Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships. Appropriate response: Use `usermod -aG` to append supplementary group membership and distinguish that operation from `usermod -g` for a primary group. Root-cause evidence: Compare `id` and getent group output before and after changes and test a fresh login for access to both old and new groups. Independent acceptance: The account has the additional authorized membership while every existing required supplementary group remains intact.
C:This shortcut is unsafe for the present Linux issue: Use `usermod -G newgroup` without `-a` and assume it appends the group while retaining all previous memberships. It cannot establish a safe correction. Linux principle: Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships. Appropriate response: Use `usermod -aG` to append supplementary group membership and distinguish that operation from `usermod -g` for a primary group. Root-cause evidence: Compare `id` and getent group output before and after changes and test a fresh login for access to both old and new groups. Independent acceptance: The account has the additional authorized membership while every existing required supplementary group remains intact.
D:This alternative addresses Timezone files, TZ override and timedatectl, not the specific issue of Supplementary group membership and primary GID: System applications display the configured local zone while UTC instant and time synchronization remain consistent. Linux principle: Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships. Appropriate response: Use `usermod -aG` to append supplementary group membership and distinguish that operation from `usermod -g` for a primary group. Root-cause evidence: Compare `id` and getent group output before and after changes and test a fresh login for access to both old and new groups. Independent acceptance: The account has the additional authorized membership while every existing required supplementary group remains intact.
Question 175
A Linux administrator investigates the following system incident: A developer gains access to a shared application directory but loses all existing secondary group memberships after a careless `usermod -G` command. Which misleading assumption MOST directly contributes to this failure and should be rejected? Select ONE best answer.
- Assume a /etc/passwd entry guarantees a populated writable home and that manually adding a directory under /root is a sound default for ordinary users.
- Assume LANG always takes priority over LC_ALL and that decimal notation or collation are identical in every locale.
- Set the hardware clock to an arbitrary local offset to fix display time and expect a temporary TZ assignment to persist globally.
- Use `usermod -G newgroup` without `-a` and assume it appends the group while retaining all previous memberships.
Explanation
Correct Answer
D:Reject this specific misconception: Use `usermod -G newgroup` without `-a` and assume it appends the group while retaining all previous memberships. It incorrectly assumes behavior that conflicts with the observed Linux conditions.
Incorrect Answers
A:That option would assume a /etc/passwd entry guarantees a populated writable home and that manually adding a directory under /root is a sound default for ordinary users, but it addresses a different concern. Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships.
B:That option would assume LANG always takes priority over LC_ALL and that decimal notation or collation are identical in every locale, but it addresses a different concern. Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships.
C:That option would set the hardware clock to an arbitrary local offset to fix display time and expect a temporary TZ assignment to persist globally, but it addresses a different concern. Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships.
Question 176
On a production Linux workstation or server, a technician observes: An analyst needs a group as a secondary membership but changes the primary group and unexpectedly alters new-file group ownership. Which administrative step is the MOST appropriate way to resolve this issue? Select ONE best answer.
- Apply the appropriate account lock or expiration, disable alternate authentication paths when needed, then remove the user and files only under approved retention policy.
- Use `usermod -aG` to append supplementary group membership and distinguish that operation from `usermod -g` for a primary group.
- Review and apply the appropriate /etc/cron.allow and /etc/at.allow or deny policies with the scheduler's supported access rules.
- Use `usermod -G newgroup` without `-a` and assume it appends the group while retaining all previous memberships.
Explanation
Correct Answer
B:Recommended administrative action: Use `usermod -aG` to append supplementary group membership and distinguish that operation from `usermod -g` for a primary group. Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships.
Incorrect Answers
A:That option would apply the appropriate account lock or expiration, disable alternate authentication paths when needed, then remove the user and files only under approved retention policy, but it addresses a different concern. Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships.
C:That option would review and apply the appropriate /etc/cron.allow and /etc/at.allow or deny policies with the scheduler's supported access rules, but it addresses a different concern. Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships.
D:This shortcut is unsafe for the present Linux issue: Use `usermod -G newgroup` without `-a` and assume it appends the group while retaining all previous memberships. Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships.
Question 177
During an LPIC-1 practice lab, the operator encounters this condition: An analyst needs a group as a secondary membership but changes the primary group and unexpectedly alters new-file group ownership. Which Linux behavior or technical principle BEST explains why the issue occurs? Select ONE best answer.
- Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships.
- cron and at can enforce distinct user-access controls, and the presence of an allow file often changes who may submit jobs.
- Systemd timers activate associated units on configured events; Persistent applies to OnCalendar timer events and can recover missed activations after the timer was inactive.
- Use `usermod -G newgroup` without `-a` and assume it appends the group while retaining all previous memberships.
Explanation
Correct Answer
A:Relevant Linux operating principle: Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships.
Incorrect Answers
B:This alternative addresses Cron and at user-access allow deny policies, not the specific issue of Supplementary group membership and primary GID: cron and at can enforce distinct user-access controls, and the presence of an allow file often changes who may submit jobs. Linux principle: Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships. Appropriate response: Use `usermod -aG` to append supplementary group membership and distinguish that operation from `usermod -g` for a primary group. Root-cause evidence: Compare `id` and getent group output before and after changes and test a fresh login for access to both old and new groups. Independent acceptance: The account has the additional authorized membership while every existing required supplementary group remains intact.
C:This alternative addresses Systemd timers and persistent missed schedules, not the specific issue of Supplementary group membership and primary GID: Systemd timers activate associated units on configured events; Persistent applies to OnCalendar timer events and can recover missed activations after the timer was inactive. Linux principle: Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships. Appropriate response: Use `usermod -aG` to append supplementary group membership and distinguish that operation from `usermod -g` for a primary group. Root-cause evidence: Compare `id` and getent group output before and after changes and test a fresh login for access to both old and new groups. Independent acceptance: The account has the additional authorized membership while every existing required supplementary group remains intact.
D:This shortcut is unsafe for the present Linux issue: Use `usermod -G newgroup` without `-a` and assume it appends the group while retaining all previous memberships. It cannot establish a safe correction. Linux principle: Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships.
Question 178
A helpdesk escalation describes this Linux behavior: An analyst needs a group as a secondary membership but changes the primary group and unexpectedly alters new-file group ownership. Which evidence or command result MOST directly tests the suspected root cause? Select ONE best answer.
- Inspect account UID and shell, service unit User setting, writable paths, group membership and whether interactive authentication is possible.
- Run `locale`, inspect LANG and LC_* values, compare representative command output under LC_ALL=C, and test number and sort handling.
- Compare `id` and getent group output before and after changes and test a fresh login for access to both old and new groups.
- Use `usermod -G newgroup` without `-a` and assume it appends the group while retaining all previous memberships.
Explanation
Correct Answer
C:Most direct verification evidence: Compare `id` and getent group output before and after changes and test a fresh login for access to both old and new groups. Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships.
Incorrect Answers
A:That option would inspect account UID and shell, service unit User setting, writable paths, group membership and whether interactive authentication is possible, but it addresses a different concern. Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships.
B:That option would run `locale`, inspect LANG and LC_* values, compare representative command output under LC_ALL=C, and test number and sort handling, but it addresses a different concern. Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships.
D:This shortcut is unsafe for the present Linux issue: Use `usermod -G newgroup` without `-a` and assume it appends the group while retaining all previous memberships. It cannot establish a safe correction. Linux principle: Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships. Appropriate response: Use `usermod -aG` to append supplementary group membership and distinguish that operation from `usermod -g` for a primary group. Root-cause evidence: Compare `id` and getent group output before and after changes and test a fresh login for access to both old and new groups. Independent acceptance: The account has the additional authorized membership while every existing required supplementary group remains intact.
Question 179
An operations handoff identifies this problem: An analyst needs a group as a secondary membership but changes the primary group and unexpectedly alters new-file group ownership. Which observed outcome BEST confirms a successful and properly scoped correction? Select ONE best answer.
- The deactivated account cannot start unauthorized sessions, and retained data is handled according to approved policy.
- The account has the additional authorized membership while every existing required supplementary group remains intact.
- Use `usermod -G newgroup` without `-a` and assume it appends the group while retaining all previous memberships.
- The required service is triggered at the intended calendar time and recovers eligible missed occurrences according to policy.
Explanation
Correct Answer
B:Observable acceptance criterion: The account has the additional authorized membership while every existing required supplementary group remains intact. Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships.
Incorrect Answers
A:This alternative addresses Account locking suspension and safe removal, not the specific issue of Supplementary group membership and primary GID: The deactivated account cannot start unauthorized sessions, and retained data is handled according to approved policy. Linux principle: Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships. Appropriate response: Use `usermod -aG` to append supplementary group membership and distinguish that operation from `usermod -g` for a primary group. Root-cause evidence: Compare `id` and getent group output before and after changes and test a fresh login for access to both old and new groups. Independent acceptance: The account has the additional authorized membership while every existing required supplementary group remains intact.
C:This shortcut is unsafe for the present Linux issue: Use `usermod -G newgroup` without `-a` and assume it appends the group while retaining all previous memberships. Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships.
D:This alternative addresses Systemd timers and persistent missed schedules, not the specific issue of Supplementary group membership and primary GID: The required service is triggered at the intended calendar time and recovers eligible missed occurrences according to policy. Linux principle: Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships. Appropriate response: Use `usermod -aG` to append supplementary group membership and distinguish that operation from `usermod -g` for a primary group. Root-cause evidence: Compare `id` and getent group output before and after changes and test a fresh login for access to both old and new groups. Independent acceptance: The account has the additional authorized membership while every existing required supplementary group remains intact.
Question 180
A team maintaining a Linux host reports: An analyst needs a group as a secondary membership but changes the primary group and unexpectedly alters new-file group ownership. Which TWO complementary steps provide the best corrective action and its most direct diagnostic verification? Select TWO answers.
- Use `usermod -aG` to append supplementary group membership and distinguish that operation from `usermod -g` for a primary group.
- Define a suitable .timer with OnCalendar and Persistent when missed calendar activations should run after downtime, and enable the timer unit rather than only the service.
- Compare `id` and getent group output before and after changes and test a fresh login for access to both old and new groups.
- Inspect the actual allow and deny files, check mode and ownership, and attempt harmless submissions as an allowed and a denied test account.
- Use `usermod -G newgroup` without `-a` and assume it appends the group while retaining all previous memberships.
Explanation
Correct Answers
A:Recommended administrative action: Use `usermod -aG` to append supplementary group membership and distinguish that operation from `usermod -g` for a primary group. Linux principle: Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships.
C:Most direct verification evidence: Compare `id` and getent group output before and after changes and test a fresh login for access to both old and new groups. Linux principle: Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships.
Incorrect Answers
B:This alternative addresses Systemd timers and persistent missed schedules, not the specific issue of Supplementary group membership and primary GID: Define a suitable .timer with OnCalendar and Persistent when missed calendar activations should run after downtime, and enable the timer unit rather than only the service. Linux principle: Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships. Appropriate response: Use `usermod -aG` to append supplementary group membership and distinguish that operation from `usermod -g` for a primary group. Root-cause evidence: Compare `id` and getent group output before and after changes and test a fresh login for access to both old and new groups. Independent acceptance: The account has the additional authorized membership while every existing required supplementary group remains intact.
D:That option would inspect the actual allow and deny files, check mode and ownership, and attempt harmless submissions as an allowed and a denied test account, but it addresses a different concern. Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships.
E:This shortcut is unsafe for the present Linux issue: Use `usermod -G newgroup` without `-a` and assume it appends the group while retaining all previous memberships. Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships.