100% Latest & Updated LPI 102-500 Practice Test Questions, Exam Dumps & Verified Answers!
30 Days Free Updates, Instant Download!
Question 260
A cron line copied from /etc/crontab into crontab -e fails because it contains an extra username field. Choose THREE measures that together correct the failure, demonstrate success and reduce recurrence.
- Use documented examples for the exact cron file format and owning user.
- Remove the username field for a per-user crontab or place the entry into the intended system crontab format.
- Enumerate membership and switch primary groups before deleting the obsolete group.
- Require a data-retention decision before using account deletion with filesystem cleanup.
- Compare id outputs and numeric ls -n owners on both hosts before granting access.
- Inspect crontab -l and the cron log for parsing and successful execution.
Explanation
Correct Answers
A:Use documented examples for the exact cron file format and owning user. It makes the outcome of the targeted repair (Remove the username field for a per-user crontab or place the entry into the intended system crontab format.) repeatable.
B:Remove the username field for a per-user crontab or place the entry into the intended system crontab format. It is the direct response; verify the result by: Inspect crontab -l and the cron log for parsing and successful execution.
F:Inspect crontab -l and the cron log for parsing and successful execution. This check is tied to the expected behavior rather than mere process uptime.
Incorrect Answers
C:That choice responds to a group still has active members failure. In this incident, System crontabs include a user field, whereas per-user crontabs have only five time fields and the command.
D:It would address remove account and managed home rather than the present problem. The appropriate correction here is: Remove the username field for a per-user crontab or place the entry into the intended system crontab format.
E:This option assumes Unix file ownership is keyed to numeric UID and GID rather than display login names. The reported symptoms instead call for: Remove the username field for a per-user crontab or place the entry into the intended system crontab format.
Question 261
A cron job works at an interactive prompt but fails to locate a tool when run by cron. Why does the reported configuration behave this way?
- Locale-dependent human-readable output changes with language settings, so the parser is fragile.
- The bytes use a different character encoding than the consumer expects.
- Cron typically starts with a limited environment that need not match the interactive shell's PATH.
- usermod -l changes the login name but does not automatically move every home pathname.
Explanation
Correct Answer
C:Cron typically starts with a limited environment that need not match the interactive shell's PATH. This is the explanation that justifies the specific remedy: Use an absolute executable path or declare the required PATH in the cron environment.
Incorrect Answers
A:This option assumes Locale-dependent human-readable output changes with language settings, so the parser is fragile. The reported symptoms instead call for: Use an absolute executable path or declare the required PATH in the cron environment.
B:The test for character encoding conversion would be: Compare known accented characters and inspect conversion errors before importing. The relevant acceptance check here is: Execute the task under a cron-like environment and capture its stderr and exit status.
D:It would address ownership after username rename rather than the present problem. The appropriate correction here is: Use an absolute executable path or declare the required PATH in the cron environment.
Question 262
A cron job works at an interactive prompt but fails to locate a tool when run by cron. What action should be planned as the next targeted correction?
- Use passwd -l for the local password and separately review other authentication methods such as SSH keys.
- Use getent passwd username to query the host's configured name-service lookup chain.
- Use an absolute executable path or declare the required PATH in the cron environment.
- Set the service account shell to an approved nologin program and control other authentication paths.
Explanation
Correct Answer
C:Use an absolute executable path or declare the required PATH in the cron environment. It is the direct response; verify the result by: Execute the task under a cron-like environment and capture its stderr and exit status.
Incorrect Answers
A:That choice responds to a lock password without destroying identity failure. In this incident, Cron typically starts with a limited environment that need not match the interactive shell's PATH.
B:This belongs to look up ldap-mapped identity, where NSS can resolve users through sources other than the local passwd file. The current issue instead is: Cron typically starts with a limited environment that need not match the interactive shell's PATH.
D:That choice responds to a nonlogin service identity failure. In this incident, Cron typically starts with a limited environment that need not match the interactive shell's PATH.
Question 263
A cron job works at an interactive prompt but fails to locate a tool when run by cron. How should the administrator verify the required behavior?
- Create one new account and compare it with an older account to establish the copy boundary.
- Use getent group and id for affected users and verify group deletion only after dependencies clear.
- Execute the task under a cron-like environment and capture its stderr and exit status.
- Compare passwd data, home-directory ownership and path references before and after.
Explanation
Correct Answer
C:Execute the task under a cron-like environment and capture its stderr and exit status. It distinguishes a genuine correction from a superficial edit that has not addressed the underlying cause: Cron typically starts with a limited environment that need not match the interactive shell's PATH.
Incorrect Answers
A:This belongs to skeleton change is not retroactive, where The skeleton is copied at account home creation; it is not a live template for existing homes. The current issue instead is: Cron typically starts with a limited environment that need not match the interactive shell's PATH.
B:Use getent group and id for affected users and verify group deletion only after dependencies clear. could help with group still has active members; it neither resolves nor demonstrates the current requirement. The distinguishing check is: Execute the task under a cron-like environment and capture its stderr and exit status.
D:This option assumes usermod -l changes the login name but does not automatically move every home pathname. The reported symptoms instead call for: Use an absolute executable path or declare the required PATH in the cron environment.
Question 264
A cron job works at an interactive prompt but fails to locate a tool when run by cron. What operational safeguard addresses the root cause?
- Monitor ownership and permissions of identity databases as security-sensitive configuration.
- Maintain centralized UID/GID allocation for cloned and networked Linux systems.
- Keep scheduled jobs independent of interactive shell startup assumptions.
- Audit /etc/nsswitch.conf and NSS reachability before troubleshooting remote identities.
Explanation
Correct Answer
C:Keep scheduled jobs independent of interactive shell startup assumptions. Sustained checks matter because Cron typically starts with a limited environment that need not match the interactive shell's PATH.
Incorrect Answers
A:Password hash data should be protected in shadow rather than exposed with world-readable permissions. That describes a different fault. Here, Cron typically starts with a limited environment that need not match the interactive shell's PATH.
B:Unix file ownership is keyed to numeric UID and GID rather than display login names. That describes a different fault. Here, Cron typically starts with a limited environment that need not match the interactive shell's PATH.
D:This option assumes NSS can resolve users through sources other than the local passwd file. The reported symptoms instead call for: Use an absolute executable path or declare the required PATH in the cron environment.
Question 265
A cron job works at an interactive prompt but fails to locate a tool when run by cron. Choose TWO case-specific steps: one that fixes the issue and one that proves the result.
- Reserve LC_ALL overrides for narrow test commands and keep persistent locale policy explicit.
- Use an absolute executable path or declare the required PATH in the cron environment.
- Review chage -l for password expiration and perform a controlled first login.
- Execute the task under a cron-like environment and capture its stderr and exit status.
- Unset LC_ALL or choose the desired locale in the controlling precedence layer.
Explanation
Correct Answers
B:Use an absolute executable path or declare the required PATH in the cron environment. It addresses the root cause, while Keep scheduled jobs independent of interactive shell startup assumptions. reduces future recurrence.
D:Execute the task under a cron-like environment and capture its stderr and exit status. This measures the specific result of applying: Use an absolute executable path or declare the required PATH in the cron environment.
Incorrect Answers
A:Reserve LC_ALL overrides for narrow test commands and keep persistent locale policy explicit. belongs to a situation where LC_ALL overrides category-specific locale values and LANG fallback while it is set. Here the evidence supports a different requirement: Keep scheduled jobs independent of interactive shell startup assumptions.
C:A normal password set does not always impose a mandatory first-login change. That describes a different fault. Here, Cron typically starts with a limited environment that need not match the interactive shell's PATH.
E:This option assumes LC_ALL overrides category-specific locale values and LANG fallback while it is set. The reported symptoms instead call for: Use an absolute executable path or declare the required PATH in the cron environment.
Question 266
A server needs a maintenance command once tonight, not repeated daily or every boot. Which explanation most directly accounts for the failure in this environment?
- The account creation procedure did not provision its home path and default skeleton files.
- A recurring cron entry would repeat a one-off maintenance action unnecessarily.
- Password hash data should be protected in shadow rather than exposed with world-readable permissions.
- Deleting an account without the remove-home option may leave home and mailbox artifacts.
Explanation
Correct Answer
B:A recurring cron entry would repeat a one-off maintenance action unnecessarily. The observation is consistent with this mechanism; a targeted repair would be: Queue the command using at with a concrete future time and check scheduler access rules.
Incorrect Answers
A:This belongs to create home for new local account, where The account creation procedure did not provision its home path and default skeleton files. The current issue instead is: A recurring cron entry would repeat a one-off maintenance action unnecessarily.
C:Password hash data should be protected in shadow rather than exposed with world-readable permissions. belongs to a situation where Password hash data should be protected in shadow rather than exposed with world-readable permissions. Here the evidence supports a different requirement: A recurring cron entry would repeat a one-off maintenance action unnecessarily.
D:This option assumes Deleting an account without the remove-home option may leave home and mailbox artifacts. The reported symptoms instead call for: Queue the command using at with a concrete future time and check scheduler access rules.
Question 267
A server needs a maintenance command once tonight, not repeated daily or every boot. What action should be planned as the next targeted correction?
- Use getent passwd username to query the host's configured name-service lookup chain.
- Set the intended primary group with usermod -g while retaining necessary supplemental groups.
- Queue the command using at with a concrete future time and check scheduler access rules.
- Use locale-neutral machine formats where possible and set LANG=C or LC_ALL=C only for required commands.
Explanation
Correct Answer
C:Queue the command using at with a concrete future time and check scheduler access rules. Unlike a broad workaround, it targets the observed cause: A recurring cron entry would repeat a one-off maintenance action unnecessarily.
Incorrect Answers
A:Use getent passwd username to query the host's configured name-service lookup chain. could help with look up ldap-mapped identity; it neither resolves nor demonstrates the current requirement. The distinguishing check is: Use atq to confirm the pending job and check completion after the scheduled time.
B:The test for primary group correction would be: Run id and create a test file to observe its default group ownership. The relevant acceptance check here is: Use atq to confirm the pending job and check completion after the scheduled time.
D:It would address stable parser output under c locale rather than the present problem. The appropriate correction here is: Queue the command using at with a concrete future time and check scheduler access rules.
Question 268
A server needs a maintenance command once tonight, not repeated daily or every boot. Which check would provide the strongest evidence that the fix worked?
- Use atq to confirm the pending job and check completion after the scheduled time.
- Run the parser under two installed locales and compare successful machine-readable results.
- Compare passwd data, home-directory ownership and path references before and after.
- Compare date output from the service and unchanged local-user shell.
Explanation
Correct Answer
A:Use atq to confirm the pending job and check completion after the scheduled time. The test is evidence-based because the underlying failure was: A recurring cron entry would repeat a one-off maintenance action unnecessarily.
Incorrect Answers
B:The test for stable parser output under c locale would be: Run the parser under two installed locales and compare successful machine-readable results. The relevant acceptance check here is: Use atq to confirm the pending job and check completion after the scheduled time.
C:That choice responds to a ownership after username rename failure. In this incident, A recurring cron entry would repeat a one-off maintenance action unnecessarily.
D:This belongs to timezone only for one process, where Timezone conversion for one process can be controlled with TZ, independent of system-wide settings. The current issue instead is: A recurring cron entry would repeat a one-off maintenance action unnecessarily.
Question 269
A server needs a maintenance command once tonight, not repeated daily or every boot. What should the team standardize to prevent similar incidents?
- Require diffing the existing group list before any supplementary-group modification.
- Use at for bounded one-time work and remove expired scheduler artifacts after review.
- Record file encodings at interchange boundaries rather than guessing from appearance.
- Standardize user creation with explicit home and skeleton policies.
Explanation
Correct Answer
B:Use at for bounded one-time work and remove expired scheduler artifacts after review. It makes the outcome of the targeted repair (Queue the command using at with a concrete future time and check scheduler access rules.) repeatable.
Incorrect Answers
A:This option assumes usermod -G without -a replaces the entire supplementary group list. The reported symptoms instead call for: Queue the command using at with a concrete future time and check scheduler access rules.
C:The test for character encoding conversion would be: Compare known accented characters and inspect conversion errors before importing. The relevant acceptance check here is: Use atq to confirm the pending job and check completion after the scheduled time.
D:This option assumes The account creation procedure did not provision its home path and default skeleton files. The reported symptoms instead call for: Queue the command using at with a concrete future time and check scheduler access rules.
Question 270
A server needs a maintenance command once tonight, not repeated daily or every boot. Select THREE measures that follow directly from the root cause and lifecycle risk.
- Schedule account renames as identity migrations with rollback and service-owner review.
- Use atq to confirm the pending job and check completion after the scheduled time.
- Use at for bounded one-time work and remove expired scheduler artifacts after review.
- Assign unique approved UIDs and reconcile affected file ownership after checking shared storage.
- Compare timedatectl status and date output with date -u.
- Queue the command using at with a concrete future time and check scheduler access rules.
Explanation
Correct Answers
B:Use atq to confirm the pending job and check completion after the scheduled time. It distinguishes a genuine correction from a superficial edit that has not addressed the underlying cause: A recurring cron entry would repeat a one-off maintenance action unnecessarily.
C:Use at for bounded one-time work and remove expired scheduler artifacts after review. It makes the outcome of the targeted repair (Queue the command using at with a concrete future time and check scheduler access rules.) repeatable.
F:Queue the command using at with a concrete future time and check scheduler access rules. It corrects the mechanism identified in the scenario: A recurring cron entry would repeat a one-off maintenance action unnecessarily.
Incorrect Answers
A:It would address ownership after username rename rather than the present problem. The appropriate correction here is: Queue the command using at with a concrete future time and check scheduler access rules.
D:The test for uid collision after cloning would be: Compare id outputs and numeric ls -n owners on both hosts before granting access. The relevant acceptance check here is: Use atq to confirm the pending job and check completion after the scheduled time.
E:Compare timedatectl status and date output with date -u. belongs to a situation where The configured timezone, not NTP synchronization, determines local-time presentation. Here the evidence supports a different requirement: Use atq to confirm the pending job and check completion after the scheduled time.
LPI Level 1 (102-500) Practice Tests