100% Latest & Updated LPI 102-500 Practice Test Questions, Exam Dumps & Verified Answers!
30 Days Free Updates, Instant Download!
Question 210
A user has the right supplementary groups but newly created files show the wrong default group owner. Which THREE actions form a suitable remediation, verification and prevention plan? Select THREE.
- Review primary and supplementary group policy separately during account changes.
- Set the intended primary group with usermod -g while retaining necessary supplemental groups.
- Run id and create a test file to observe its default group ownership.
- Reserve LC_ALL overrides for narrow test commands and keep persistent locale policy explicit.
- Run atq again to verify the removed job no longer appears.
- Use absolute paths or explicitly cd into a validated task directory before writing.
Explanation
Correct Answers
A:Review primary and supplementary group policy separately during account changes. This control detects or prevents the same mechanism before another incident.
B:Set the intended primary group with usermod -g while retaining necessary supplemental groups. Unlike a broad workaround, it targets the observed cause: The primary GID, not the complete supplementary group list, normally determines the default file group.
C:Run id and create a test file to observe its default group ownership. The observation confirms the diagnosis or falsifies it before declaring the incident resolved.
Incorrect Answers
D:It would address lc_all overrides lang rather than the present problem. The appropriate correction here is: Set the intended primary group with usermod -g while retaining necessary supplemental groups.
E:This option assumes A queued at job persists until it runs or is explicitly removed. The reported symptoms instead call for: Set the intended primary group with usermod -g while retaining necessary supplemental groups.
F:Use absolute paths or explicitly cd into a validated task directory before writing. belongs to a situation where Scheduled jobs do not inherit the caller's working directory from an earlier terminal session. Here the evidence supports a different requirement: Set the intended primary group with usermod -g while retaining necessary supplemental groups.
Question 211
A service account must own application files but must not provide staff with an interactive command shell. Which diagnosis is supported by the observations?
- An ordinary interactive login shell in /etc/passwd can permit shell access if credentials and policy allow.
- System crontabs include a user field, whereas per-user crontabs have only five time fields and the command.
- UTF-8 encodes some characters as multiple bytes, so byte counts and character counts can differ.
- Monotonic timers measure elapsed time rather than matching calendar dates and weekdays.
Explanation
Correct Answer
A:An ordinary interactive login shell in /etc/passwd can permit shell access if credentials and policy allow. A good follow-up is to test this explanation through: Inspect getent passwd and attempt an interactive login in a controlled test.
Incorrect Answers
B:That choice responds to a user crontab versus system crontab failure. In this incident, An ordinary interactive login shell in /etc/passwd can permit shell access if credentials and policy allow.
C:UTF-8 encodes some characters as multiple bytes, so byte counts and character counts can differ. belongs to a situation where UTF-8 encodes some characters as multiple bytes, so byte counts and character counts can differ. Here the evidence supports a different requirement: An ordinary interactive login shell in /etc/passwd can permit shell access if credentials and policy allow.
D:It would address calendar schedule in systemd rather than the present problem. The appropriate correction here is: Set the service account shell to an approved nologin program and control other authentication paths.
Question 212
A service account must own application files but must not provide staff with an interactive command shell. Which remedial step follows from the observed mechanism?
- Set LC_MESSAGES and LC_NUMERIC separately to meet each requirement.
- Set the service account shell to an approved nologin program and control other authentication paths.
- Enable and start the intended timer with systemctl enable --now when that is permitted.
- Use a character-aware operation with an explicit UTF-8 locale rather than treating raw bytes as graphemes.
Explanation
Correct Answer
B:Set the service account shell to an approved nologin program and control other authentication paths. It addresses the root cause, while Use purpose-bound service identities with noninteractive shells and minimal authorization. reduces future recurrence.
Incorrect Answers
A:This belongs to locale category isolation, where An all-category locale setting affects more than message translations, including numeric punctuation. The current issue instead is: An ordinary interactive login shell in /etc/passwd can permit shell access if credentials and policy allow.
C:Enable and start the intended timer with systemctl enable --now when that is permitted. belongs to a situation where Starting a timer activates it now; enabling it installs the boot-time dependency for future starts. Here the evidence supports a different requirement: Set the service account shell to an approved nologin program and control other authentication paths.
D:UTF-8 encodes some characters as multiple bytes, so byte counts and character counts can differ. That describes a different fault. Here, An ordinary interactive login shell in /etc/passwd can permit shell access if credentials and policy allow.
Question 213
A service account must own application files but must not provide staff with an interactive command shell. Which test would confirm the suspected Linux mechanism?
- Inspect getent passwd and attempt an interactive login in a controlled test.
- Run locale and inspect LC_ALL plus category values before and after the change.
- Inspect the resolved /etc/localtime target and compare offset before and after.
- Power down through one calendar boundary and confirm a catch-up activation after boot.
Explanation
Correct Answer
A:Inspect getent passwd and attempt an interactive login in a controlled test. This measures the specific result of applying: Set the service account shell to an approved nologin program and control other authentication paths.
Incorrect Answers
B:Run locale and inspect LC_ALL plus category values before and after the change. could help with lc_all overrides lang; it neither resolves nor demonstrates the current requirement. The distinguishing check is: Inspect getent passwd and attempt an interactive login in a controlled test.
C:Inspect the resolved /etc/localtime target and compare offset before and after. belongs to a situation where The local-time database link is stale or references a zone file that is no longer valid. Here the evidence supports a different requirement: Inspect getent passwd and attempt an interactive login in a controlled test.
D:This belongs to catch-up after power outage, where A wall-clock timer does not necessarily catch up missed activations unless persistent semantics are configured. The current issue instead is: An ordinary interactive login shell in /etc/passwd can permit shell access if credentials and policy allow.
Question 214
A service account must own application files but must not provide staff with an interactive command shell. What longer-term control best supports this requirement?
- Avoid parsing localized prose when structured output is available.
- Deploy and test timer and service units as a linked pair.
- Use purpose-bound service identities with noninteractive shells and minimal authorization.
- Choose calendar versus monotonic schedules from the actual business requirement.
Explanation
Correct Answer
C:Use purpose-bound service identities with noninteractive shells and minimal authorization. This control detects or prevents the same mechanism before another incident.
Incorrect Answers
A:Avoid parsing localized prose when structured output is available. belongs to a situation where Locale-dependent human-readable output changes with language settings, so the parser is fragile. Here the evidence supports a different requirement: Use purpose-bound service identities with noninteractive shells and minimal authorization.
B:A timer activates its associated .service unit; a wrong or missing unit mapping prevents the intended action. That describes a different fault. Here, An ordinary interactive login shell in /etc/passwd can permit shell access if credentials and policy allow.
D:The test for calendar schedule in systemd would be: Inspect systemd-analyze calendar output and the next trigger from systemctl list-timers. The relevant acceptance check here is: Inspect getent passwd and attempt an interactive login in a controlled test.
Question 215
A service account must own application files but must not provide staff with an interactive command shell. Select TWO justified actions that address this particular problem and confirm closure.
- Use a character-aware operation with an explicit UTF-8 locale rather than treating raw bytes as graphemes.
- Keep scheduled jobs independent of interactive shell startup assumptions.
- Set the service account shell to an approved nologin program and control other authentication paths.
- Run locale and inspect LC_ALL plus category values before and after the change.
- Inspect getent passwd and attempt an interactive login in a controlled test.
Explanation
Correct Answers
C:Set the service account shell to an approved nologin program and control other authentication paths. It is the direct response; verify the result by: Inspect getent passwd and attempt an interactive login in a controlled test.
E:Inspect getent passwd and attempt an interactive login in a controlled test. It verifies that the targeted action (Set the service account shell to an approved nologin program and control other authentication paths.) achieved its intended outcome.
Incorrect Answers
A:UTF-8 encodes some characters as multiple bytes, so byte counts and character counts can differ. That describes a different fault. Here, An ordinary interactive login shell in /etc/passwd can permit shell access if credentials and policy allow.
B:Keep scheduled jobs independent of interactive shell startup assumptions. belongs to a situation where Cron typically starts with a limited environment that need not match the interactive shell's PATH. Here the evidence supports a different requirement: Use purpose-bound service identities with noninteractive shells and minimal authorization.
D:The test for lc_all overrides lang would be: Run locale and inspect LC_ALL plus category values before and after the change. The relevant acceptance check here is: Inspect getent passwd and attempt an interactive login in a controlled test.
Question 216
An LDAP-authenticated user works on a host but grep on /etc/passwd finds no matching account. Why does the reported configuration behave this way?
- UTF-8 encodes some characters as multiple bytes, so byte counts and character counts can differ.
- A recurring cron entry would repeat a one-off maintenance action unnecessarily.
- Scheduled jobs do not inherit the caller's working directory from an earlier terminal session.
- NSS can resolve users through sources other than the local passwd file.
Explanation
Correct Answer
D:NSS can resolve users through sources other than the local passwd file. The administrator should distinguish this from unrelated symptoms by checking: Compare getent and direct /etc/passwd results for the same network identity.
Incorrect Answers
A:UTF-8 encodes some characters as multiple bytes, so byte counts and character counts can differ. belongs to a situation where UTF-8 encodes some characters as multiple bytes, so byte counts and character counts can differ. Here the evidence supports a different requirement: NSS can resolve users through sources other than the local passwd file.
B:It would address one-time future task rather than the present problem. The appropriate correction here is: Use getent passwd username to query the host's configured name-service lookup chain.
C:The test for working directory in cron job would be: Run under a neutral working directory and locate the generated output exactly. The relevant acceptance check here is: Compare getent and direct /etc/passwd results for the same network identity.
Question 217
An LDAP-authenticated user works on a host but grep on /etc/passwd finds no matching account. What action should be planned as the next targeted correction?
- Unset LC_ALL or choose the desired locale in the controlling precedence layer.
- Use getent passwd username to query the host's configured name-service lookup chain.
- Convert from the known source encoding to UTF-8 using iconv with explicit -f and -t options.
- Use OnCalendar with the appropriate weekday/time expression in the timer unit.
Explanation
Correct Answer
B:Use getent passwd username to query the host's configured name-service lookup chain. This is appropriate because NSS can resolve users through sources other than the local passwd file.
Incorrect Answers
A:It would address lc_all overrides lang rather than the present problem. The appropriate correction here is: Use getent passwd username to query the host's configured name-service lookup chain.
C:That choice responds to a character encoding conversion failure. In this incident, NSS can resolve users through sources other than the local passwd file.
D:Use OnCalendar with the appropriate weekday/time expression in the timer unit. belongs to a situation where Monotonic timers measure elapsed time rather than matching calendar dates and weekdays. Here the evidence supports a different requirement: Use getent passwd username to query the host's configured name-service lookup chain.
Question 218
An LDAP-authenticated user works on a host but grep on /etc/passwd finds no matching account. What diagnostic result would demonstrate the target behavior?
- Compare known accented characters and inspect conversion errors before importing.
- Compare getent and direct /etc/passwd results for the same network identity.
- Run locale -a and a test locale-sensitive command after installation.
- Execute the task under a cron-like environment and capture its stderr and exit status.
Explanation
Correct Answer
B:Compare getent and direct /etc/passwd results for the same network identity. The test is evidence-based because the underlying failure was: NSS can resolve users through sources other than the local passwd file.
Incorrect Answers
A:The bytes use a different character encoding than the consumer expects. That describes a different fault. Here, NSS can resolve users through sources other than the local passwd file.
C:Run locale -a and a test locale-sensitive command after installation. could help with available locale not generated; it neither resolves nor demonstrates the current requirement. The distinguishing check is: Compare getent and direct /etc/passwd results for the same network identity.
D:It would address cron path differs from terminal rather than the present problem. The appropriate correction here is: Use getent passwd username to query the host's configured name-service lookup chain.
Question 219
An LDAP-authenticated user works on a host but grep on /etc/passwd finds no matching account. What operational safeguard addresses the root cause?
- Avoid complex shell quoting in crontabs; move nontrivial commands into tested scripts.
- Audit /etc/nsswitch.conf and NSS reachability before troubleshooting remote identities.
- Choose calendar versus monotonic schedules from the actual business requirement.
- Define category-specific locale requirements for programs exchanging numeric data.
Explanation
Correct Answer
B:Audit /etc/nsswitch.conf and NSS reachability before troubleshooting remote identities. This control detects or prevents the same mechanism before another incident.
Incorrect Answers
A:The test for cron percent escape would be: Run the cron job with date formatting and compare the recorded command output. The relevant acceptance check here is: Compare getent and direct /etc/passwd results for the same network identity.
C:Choose calendar versus monotonic schedules from the actual business requirement. belongs to a situation where Monotonic timers measure elapsed time rather than matching calendar dates and weekdays. Here the evidence supports a different requirement: Audit /etc/nsswitch.conf and NSS reachability before troubleshooting remote identities.
D:It would address locale category isolation rather than the present problem. The appropriate correction here is: Use getent passwd username to query the host's configured name-service lookup chain.
Question 220
An LDAP-authenticated user works on a host but grep on /etc/passwd finds no matching account. Choose THREE measures that together correct the failure, demonstrate success and reduce recurrence.
- Record file encodings at interchange boundaries rather than guessing from appearance.
- Compare getent and direct /etc/passwd results for the same network identity.
- Use getent passwd username to query the host's configured name-service lookup chain.
- Redirect stderr and stdout to controlled logs or use journal-aware service units with proper error handling.
- Use systemctl list-timers and journalctl -u for the timer and service to verify activation.
- Audit /etc/nsswitch.conf and NSS reachability before troubleshooting remote identities.
Explanation
Correct Answers
B:Compare getent and direct /etc/passwd results for the same network identity. It distinguishes a genuine correction from a superficial edit that has not addressed the underlying cause: NSS can resolve users through sources other than the local passwd file.
C:Use getent passwd username to query the host's configured name-service lookup chain. It is the direct response; verify the result by: Compare getent and direct /etc/passwd results for the same network identity.
F:Audit /etc/nsswitch.conf and NSS reachability before troubleshooting remote identities. This control detects or prevents the same mechanism before another incident.
Incorrect Answers
A:Record file encodings at interchange boundaries rather than guessing from appearance. could help with character encoding conversion; it neither resolves nor demonstrates the current requirement. The distinguishing check is: Compare getent and direct /etc/passwd results for the same network identity.
D:Redirect stderr and stdout to controlled logs or use journal-aware service units with proper error handling. belongs to a situation where Cron execution does not guarantee application-level observability without captured output and status. Here the evidence supports a different requirement: Use getent passwd username to query the host's configured name-service lookup chain.
E:Use systemctl list-timers and journalctl -u for the timer and service to verify activation. belongs to a situation where A timer activates its associated .service unit; a wrong or missing unit mapping prevents the intended action. Here the evidence supports a different requirement: Compare getent and direct /etc/passwd results for the same network identity.
LPI Level 1 (102-500) Practice Tests