LPI 102-500 Practice Test 19
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.
Question 181
While verifying a Linux change request, an engineer finds: A contractor must be temporarily prevented from authenticating, but the operations team deletes their home and the audit records needed for a later investigation. Which administrative step is the MOST appropriate way to resolve this issue? Select ONE best answer.
- Assume locking a password always disables every public-key or existing session and that deleting a home immediately is required for temporary suspension.
- Provide explicit executable paths and required environment variables in the crontab or wrapper, avoiding assumptions about interactive startup files.
- 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.
- Apply the appropriate account lock or expiration, disable alternate authentication paths when needed, then remove the user and files only under approved retention policy.
Explanation
Correct Answer
D:Recommended administrative action: Apply the appropriate account lock or expiration, disable alternate authentication paths when needed, then remove the user and files only under approved retention policy.
Incorrect Answers
A:That option would assume locking a password always disables every public-key or existing session and that deleting a home immediately is required for temporary suspension, but it addresses a different concern. Locking a password is not necessarily identical to disabling every authentication method, and deprovisioning accounts differs from deleting all associated data.
B:This alternative addresses Cron execution environment and absolute paths, not the specific issue of Account locking suspension and safe removal: Provide explicit executable paths and required environment variables in the crontab or wrapper, avoiding assumptions about interactive startup files. Linux principle: Locking a password is not necessarily identical to disabling every authentication method, and deprovisioning accounts differs from deleting all associated data. Appropriate response: Apply the appropriate account lock or expiration, disable alternate authentication paths when needed, then remove the user and files only under approved retention policy. Root-cause evidence: Review passwd status, chage or usermod lock fields, SSH key access, active sessions and retention or account-removal records. Independent acceptance: The deactivated account cannot start unauthorized sessions, and retained data is handled according to approved policy.
C:This alternative addresses Systemd timers and persistent missed schedules, not the specific issue of Account locking suspension and safe removal: 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: Locking a password is not necessarily identical to disabling every authentication method, and deprovisioning accounts differs from deleting all associated data. Appropriate response: Apply the appropriate account lock or expiration, disable alternate authentication paths when needed, then remove the user and files only under approved retention policy. Root-cause evidence: Review passwd status, chage or usermod lock fields, SSH key access, active sessions and retention or account-removal records. Independent acceptance: The deactivated account cannot start unauthorized sessions, and retained data is handled according to approved policy.
Question 182
A Linux administrator investigates the following system incident: A contractor must be temporarily prevented from authenticating, but the operations team deletes their home and the audit records needed for a later investigation. Which Linux behavior or technical principle BEST explains why the issue occurs? Select ONE best answer.
- Assume locking a password always disables every public-key or existing session and that deleting a home immediately is required for temporary suspension.
- Nonhuman service identities reduce the blast radius of background processes; human interactive login and unrestricted privilege are not prerequisites for a daemon.
- Locking a password is not necessarily identical to disabling every authentication method, and deprovisioning accounts differs from deleting all associated data.
- Cron typically supplies a minimal noninteractive execution environment; user profile aliases and shell search paths are not assured.
Explanation
Correct Answer
C:Relevant Linux operating principle: Locking a password is not necessarily identical to disabling every authentication method, and deprovisioning accounts differs from deleting all associated data.
Incorrect Answers
A:That option would assume locking a password always disables every public-key or existing session and that deleting a home immediately is required for temporary suspension, but it addresses a different concern. Appropriate response: Apply the appropriate account lock or expiration, disable alternate authentication paths when needed, then remove the user and files only under approved retention policy.
B:This alternative addresses System service accounts and least privilege, not the specific issue of Account locking suspension and safe removal: Nonhuman service identities reduce the blast radius of background processes; human interactive login and unrestricted privilege are not prerequisites for a daemon. Linux principle: Locking a password is not necessarily identical to disabling every authentication method, and deprovisioning accounts differs from deleting all associated data. Appropriate response: Apply the appropriate account lock or expiration, disable alternate authentication paths when needed, then remove the user and files only under approved retention policy. Root-cause evidence: Review passwd status, chage or usermod lock fields, SSH key access, active sessions and retention or account-removal records. Independent acceptance: The deactivated account cannot start unauthorized sessions, and retained data is handled according to approved policy.
D:This alternative addresses Cron execution environment and absolute paths, not the specific issue of Account locking suspension and safe removal: Cron typically supplies a minimal noninteractive execution environment; user profile aliases and shell search paths are not assured. Linux principle: Locking a password is not necessarily identical to disabling every authentication method, and deprovisioning accounts differs from deleting all associated data. Appropriate response: Apply the appropriate account lock or expiration, disable alternate authentication paths when needed, then remove the user and files only under approved retention policy. Root-cause evidence: Review passwd status, chage or usermod lock fields, SSH key access, active sessions and retention or account-removal records. Independent acceptance: The deactivated account cannot start unauthorized sessions, and retained data is handled according to approved policy.
Question 183
On a production Linux workstation or server, a technician observes: A contractor must be temporarily prevented from authenticating, but the operations team deletes their home and the audit records needed for a later investigation. Which evidence or command result MOST directly tests the suspected root cause? Select ONE best answer.
- Compare `getent passwd username`, `getent group groupname`, `id` and the nsswitch database configuration, checking authoritative sources.
- 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.
- Assume locking a password always disables every public-key or existing session and that deleting a home immediately is required for temporary suspension.
Explanation
Correct Answer
C:Most direct verification evidence: Review passwd status, chage or usermod lock fields, SSH key access, active sessions and retention or account-removal records.
Incorrect Answers
A:That option would compare `getent passwd username`, `getent group groupname`, `id` and the nsswitch database configuration, checking authoritative sources, but it addresses a different concern. Locking a password is not necessarily identical to disabling every authentication method, and deprovisioning accounts differs from deleting all associated data.
B:That option would compare `id` and getent group output before and after changes and test a fresh login for access to both old and new groups, but it addresses a different concern. Locking a password is not necessarily identical to disabling every authentication method, and deprovisioning accounts differs from deleting all associated data.
D:This shortcut is unsafe for the present Linux issue: Assume locking a password always disables every public-key or existing session and that deleting a home immediately is required for temporary suspension. It cannot establish a safe correction.
Question 184
During an LPIC-1 practice lab, the operator encounters this condition: A contractor must be temporarily prevented from authenticating, but the operations team deletes their home and the audit records needed for a later investigation. Which observed outcome BEST confirms a successful and properly scoped correction? Select ONE best answer.
- The password is updated or expiration policy enforced as approved while shadow hashes remain inaccessible to unprivileged users.
- The deactivated account cannot start unauthorized sessions, and retained data is handled according to approved policy.
- The required service is triggered at the intended calendar time and recovers eligible missed occurrences according to policy.
- Assume locking a password always disables every public-key or existing session and that deleting a home immediately is required for temporary suspension.
Explanation
Correct Answer
B:Observable acceptance criterion: The deactivated account cannot start unauthorized sessions, and retained data is handled according to approved policy.
Incorrect Answers
A:This alternative addresses Shadow password entries and password aging, not the specific issue of Account locking suspension and safe removal: The password is updated or expiration policy enforced as approved while shadow hashes remain inaccessible to unprivileged users. Linux principle: Locking a password is not necessarily identical to disabling every authentication method, and deprovisioning accounts differs from deleting all associated data. Appropriate response: Apply the appropriate account lock or expiration, disable alternate authentication paths when needed, then remove the user and files only under approved retention policy. Root-cause evidence: Review passwd status, chage or usermod lock fields, SSH key access, active sessions and retention or account-removal records. Independent acceptance: The deactivated account cannot start unauthorized sessions, and retained data is handled according to approved policy.
C:This alternative addresses Systemd timers and persistent missed schedules, not the specific issue of Account locking suspension and safe removal: The required service is triggered at the intended calendar time and recovers eligible missed occurrences according to policy. Linux principle: Locking a password is not necessarily identical to disabling every authentication method, and deprovisioning accounts differs from deleting all associated data. Appropriate response: Apply the appropriate account lock or expiration, disable alternate authentication paths when needed, then remove the user and files only under approved retention policy. Root-cause evidence: Review passwd status, chage or usermod lock fields, SSH key access, active sessions and retention or account-removal records. Independent acceptance: The deactivated account cannot start unauthorized sessions, and retained data is handled according to approved policy.
D:This shortcut is unsafe for the present Linux issue: Assume locking a password always disables every public-key or existing session and that deleting a home immediately is required for temporary suspension. Locking a password is not necessarily identical to disabling every authentication method, and deprovisioning accounts differs from deleting all associated data.
Question 185
A helpdesk escalation describes this Linux behavior: A contractor must be temporarily prevented from authenticating, but the operations team deletes their home and the audit records needed for a later investigation. Which misleading assumption MOST directly contributes to this failure and should be rejected? Select ONE best answer.
- Assume the sixth username column is mandatory in both per-user crontabs and system-wide cron definitions.
- Assume any enabled .service automatically schedules itself and that every timer catches up on missed executions without Persistent.
- Set the hardware clock to an arbitrary local offset to fix display time and expect a temporary TZ assignment to persist globally.
- Assume locking a password always disables every public-key or existing session and that deleting a home immediately is required for temporary suspension.
Explanation
Correct Answer
D:Reject this specific misconception: Assume locking a password always disables every public-key or existing session and that deleting a home immediately is required for temporary suspension. It incorrectly assumes behavior that conflicts with the observed Linux conditions.
Incorrect Answers
A:That option would assume the sixth username column is mandatory in both per-user crontabs and system-wide cron definitions, but it addresses a different concern. Locking a password is not necessarily identical to disabling every authentication method, and deprovisioning accounts differs from deleting all associated data.
B:That option would assume any enabled .service automatically schedules itself and that every timer catches up on missed executions without Persistent, but it addresses a different concern. Locking a password is not necessarily identical to disabling every authentication method, and deprovisioning accounts differs from deleting all associated data.
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. Locking a password is not necessarily identical to disabling every authentication method, and deprovisioning accounts differs from deleting all associated data.
Question 186
An operations handoff identifies this problem: An offboarded user is still able to authenticate by an unrelated SSH key after only password-based access was disabled. Which administrative step is the MOST appropriate way to resolve this issue? Select ONE best answer.
- Assume locking a password always disables every public-key or existing session and that deleting a home immediately is required for temporary suspension.
- 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 passwd and chage to update password or aging policy through supported account tools, preserving restricted shadow-file access.
- Use a distinct appropriately limited service or system account, choose a non-login shell and limit filesystem and group rights to the daemon's needs.
Explanation
Correct Answer
B:Recommended administrative action: Apply the appropriate account lock or expiration, disable alternate authentication paths when needed, then remove the user and files only under approved retention policy.
Incorrect Answers
A:This shortcut is unsafe for the present Linux issue: Assume locking a password always disables every public-key or existing session and that deleting a home immediately is required for temporary suspension. It cannot establish a safe correction.
C:That option would use passwd and chage to update password or aging policy through supported account tools, preserving restricted shadow-file access, but it addresses a different concern. Locking a password is not necessarily identical to disabling every authentication method, and deprovisioning accounts differs from deleting all associated data.
D:That option would use a distinct appropriately limited service or system account, choose a non-login shell and limit filesystem and group rights to the daemon's needs, but it addresses a different concern. Locking a password is not necessarily identical to disabling every authentication method, and deprovisioning accounts differs from deleting all associated data.
Question 187
A team maintaining a Linux host reports: An offboarded user is still able to authenticate by an unrelated SSH key after only password-based access was disabled. Which Linux behavior or technical principle BEST explains why the issue occurs? Select ONE best answer.
- Assume locking a password always disables every public-key or existing session and that deleting a home immediately is required for temporary suspension.
- The timezone controls presentation of timestamps independently of UTC-based timekeeping; a TZ environment value normally affects only processes that use it.
- Locking a password is not necessarily identical to disabling every authentication method, and deprovisioning accounts differs from deleting all associated data.
- Per-user cron entries inherit the owner identity and do not contain a username field; system crontab entries add a separate user column.
Explanation
Correct Answer
C:Relevant Linux operating principle: Locking a password is not necessarily identical to disabling every authentication method, and deprovisioning accounts differs from deleting all associated data.
Incorrect Answers
A:This shortcut is unsafe for the present Linux issue: Assume locking a password always disables every public-key or existing session and that deleting a home immediately is required for temporary suspension. It cannot establish a safe correction. Linux principle: Locking a password is not necessarily identical to disabling every authentication method, and deprovisioning accounts differs from deleting all associated data.
B:This alternative addresses Timezone files, TZ override and timedatectl, not the specific issue of Account locking suspension and safe removal: The timezone controls presentation of timestamps independently of UTC-based timekeeping; a TZ environment value normally affects only processes that use it. Linux principle: Locking a password is not necessarily identical to disabling every authentication method, and deprovisioning accounts differs from deleting all associated data. Appropriate response: Apply the appropriate account lock or expiration, disable alternate authentication paths when needed, then remove the user and files only under approved retention policy. Root-cause evidence: Review passwd status, chage or usermod lock fields, SSH key access, active sessions and retention or account-removal records. Independent acceptance: The deactivated account cannot start unauthorized sessions, and retained data is handled according to approved policy.
D:This alternative addresses User crontab versus system crontab fields, not the specific issue of Account locking suspension and safe removal: Per-user cron entries inherit the owner identity and do not contain a username field; system crontab entries add a separate user column. Linux principle: Locking a password is not necessarily identical to disabling every authentication method, and deprovisioning accounts differs from deleting all associated data. Appropriate response: Apply the appropriate account lock or expiration, disable alternate authentication paths when needed, then remove the user and files only under approved retention policy. Root-cause evidence: Review passwd status, chage or usermod lock fields, SSH key access, active sessions and retention or account-removal records. Independent acceptance: The deactivated account cannot start unauthorized sessions, and retained data is handled according to approved policy.
Question 188
While verifying a Linux change request, an engineer finds: An offboarded user is still able to authenticate by an unrelated SSH key after only password-based access was disabled. Which evidence or command result MOST directly tests the suspected root cause? Select ONE best answer.
- Inspect the at queue and service status, verify the planned timestamp and run a safe one-time test.
- Assume locking a password always disables every public-key or existing session and that deleting a home immediately is required for temporary suspension.
- Review passwd status, chage or usermod lock fields, SSH key access, active sessions and retention or account-removal records.
- Inspect account UID and shell, service unit User setting, writable paths, group membership and whether interactive authentication is possible.
Explanation
Correct Answer
C:Most direct verification evidence: Review passwd status, chage or usermod lock fields, SSH key access, active sessions and retention or account-removal records.
Incorrect Answers
A:That option would inspect the at queue and service status, verify the planned timestamp and run a safe one-time test, but it addresses a different concern. Locking a password is not necessarily identical to disabling every authentication method, and deprovisioning accounts differs from deleting all associated data.
B:This shortcut is unsafe for the present Linux issue: Assume locking a password always disables every public-key or existing session and that deleting a home immediately is required for temporary suspension. It cannot establish a safe correction. Linux principle: Locking a password is not necessarily identical to disabling every authentication method, and deprovisioning accounts differs from deleting all associated data. Appropriate response: Apply the appropriate account lock or expiration, disable alternate authentication paths when needed, then remove the user and files only under approved retention policy. Root-cause evidence: Review passwd status, chage or usermod lock fields, SSH key access, active sessions and retention or account-removal records. Independent acceptance: The deactivated account cannot start unauthorized sessions, and retained data is handled according to approved policy.
D: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. Locking a password is not necessarily identical to disabling every authentication method, and deprovisioning accounts differs from deleting all associated data.
Question 189
A Linux administrator investigates the following system incident: An offboarded user is still able to authenticate by an unrelated SSH key after only password-based access was disabled. Which observed outcome BEST confirms a successful and properly scoped correction? Select ONE best answer.
- The intended user executes the scheduled command at the chosen time with no stray username token.
- Assume locking a password always disables every public-key or existing session and that deleting a home immediately is required for temporary suspension.
- The deactivated account cannot start unauthorized sessions, and retained data is handled according to approved policy.
- The password is updated or expiration policy enforced as approved while shadow hashes remain inaccessible to unprivileged users.
Explanation
Correct Answer
C:Observable acceptance criterion: The deactivated account cannot start unauthorized sessions, and retained data is handled according to approved policy.
Incorrect Answers
A:This alternative addresses User crontab versus system crontab fields, not the specific issue of Account locking suspension and safe removal: The intended user executes the scheduled command at the chosen time with no stray username token. Linux principle: Locking a password is not necessarily identical to disabling every authentication method, and deprovisioning accounts differs from deleting all associated data. Appropriate response: Apply the appropriate account lock or expiration, disable alternate authentication paths when needed, then remove the user and files only under approved retention policy. Root-cause evidence: Review passwd status, chage or usermod lock fields, SSH key access, active sessions and retention or account-removal records. Independent acceptance: The deactivated account cannot start unauthorized sessions, and retained data is handled according to approved policy.
B:This shortcut is unsafe for the present Linux issue: Assume locking a password always disables every public-key or existing session and that deleting a home immediately is required for temporary suspension. Locking a password is not necessarily identical to disabling every authentication method, and deprovisioning accounts differs from deleting all associated data.
D:This alternative addresses Shadow password entries and password aging, not the specific issue of Account locking suspension and safe removal: The password is updated or expiration policy enforced as approved while shadow hashes remain inaccessible to unprivileged users. Linux principle: Locking a password is not necessarily identical to disabling every authentication method, and deprovisioning accounts differs from deleting all associated data. Appropriate response: Apply the appropriate account lock or expiration, disable alternate authentication paths when needed, then remove the user and files only under approved retention policy. Root-cause evidence: Review passwd status, chage or usermod lock fields, SSH key access, active sessions and retention or account-removal records. Independent acceptance: The deactivated account cannot start unauthorized sessions, and retained data is handled according to approved policy.
Question 190
On a production Linux workstation or server, a technician observes: An offboarded user is still able to authenticate by an unrelated SSH key after only password-based access was disabled. Which TWO complementary steps provide the best corrective action and its most direct diagnostic verification? Select TWO answers.
- Assume locking a password always disables every public-key or existing session and that deleting a home immediately is required for temporary suspension.
- Review passwd status, chage or usermod lock fields, SSH key access, active sessions and retention or account-removal records.
- Compare `id` and getent group output before and after changes and test a fresh login for access to both old and new groups.
- Apply the appropriate account lock or expiration, disable alternate authentication paths when needed, then remove the user and files only under approved retention policy.
- Review and apply the appropriate /etc/cron.allow and /etc/at.allow or deny policies with the scheduler's supported access rules.
Explanation
Correct Answers
B:Most direct verification evidence: Review passwd status, chage or usermod lock fields, SSH key access, active sessions and retention or account-removal records. Linux principle: Locking a password is not necessarily identical to disabling every authentication method, and deprovisioning accounts differs from deleting all associated data.
D:Recommended administrative action: Apply the appropriate account lock or expiration, disable alternate authentication paths when needed, then remove the user and files only under approved retention policy. Linux principle: Locking a password is not necessarily identical to disabling every authentication method, and deprovisioning accounts differs from deleting all associated data.
Incorrect Answers
A:This shortcut is unsafe for the present Linux issue: Assume locking a password always disables every public-key or existing session and that deleting a home immediately is required for temporary suspension. Locking a password is not necessarily identical to disabling every authentication method, and deprovisioning accounts differs from deleting all associated data.
C:This alternative addresses Supplementary group membership and primary GID, not the specific issue of Account locking suspension and safe removal: Compare `id` and getent group output before and after changes and test a fresh login for access to both old and new groups.
E: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. Locking a password is not necessarily identical to disabling every authentication method, and deprovisioning accounts differs from deleting all associated data.