Question 240
During validation, this problem was found: The task runs before its required network mount is ready due to absent ordering. The original goal was: A startup script must run after boot without putting an @reboot entry into individual user crontabs. Which targeted correction best resolves it?
- Include the username in /etc/crontab or place a five-field entry in the user's own crontab.
- Add Persistent=true to the calendar-based timer and verify its state directory/behavior.
- Use at with the specified time and remove the unnecessary recurring cron entry.
- Define the correct WantedBy/After relationships in the service unit and enable it.
Explanation
Correct Answer
D:Define the correct WantedBy/After relationships in the service unit and enable it. It directly addresses the observed symptom: The task runs before its required network mount is ready due to absent ordering. The relevant mechanism is An enabled systemd unit can start once at a particular boot stage with explicit ordering and dependencies.
Incorrect Answers
A:This fix is aimed at The user field was omitted, causing the cron line to be parsed incorrectly. and would be relevant if An administrator must place a centrally managed cron job in /etc/crontab and specify the account that runs it. The incident instead states The task runs before its required network mount is ready due to absent ordering. and needs Define the correct WantedBy/After relationships in the service unit and enable it.
B:This fix is aimed at The timer skips every missed run after a power outage despite a catch-up requirement. and would be relevant if A periodic cleanup should catch up once after a system was powered off during its scheduled run. The incident instead states The task runs before its required network mount is ready due to absent ordering. and needs Define the correct WantedBy/After relationships in the service unit and enable it.
C:This fix is aimed at A daily cron entry repeats the task on subsequent days. and would be relevant if A maintenance task should execute only once at 15:00 tomorrow rather than repeat daily. The incident instead states The task runs before its required network mount is ready due to absent ordering. and needs Define the correct WantedBy/After relationships in the service unit and enable it.
Question 241
A Linux administrator faces this requirement: A batch team must deny certain users one-time at scheduling while allowing designated operators. Which specific action is the best direct solution?
- Apply /etc/at.allow with an explicit list of authorized users where available.
- Submit the command with at for the requested one-time execution time.
- Set Persistent=true in a systemd calendar timer with suitable scheduling semantics.
- Add an entry including the username field between the five time fields and the command.
Explanation
Correct Answer
A:Apply /etc/at.allow with an explicit list of authorized users where available. The mechanism is: at.allow takes precedence as an allowlist when present; at.deny serves a different default policy role.
Incorrect Answers
B:Submit the command with at for the requested one-time execution time. That operation is designed for the different case: A maintenance task should execute only once at 15:00 tomorrow rather than repeat daily. It does not perform the specific action required here: Apply /etc/at.allow with an explicit list of authorized users where available.
C:Set Persistent=true in a systemd calendar timer with suitable scheduling semantics. That operation is designed for the different case: A periodic cleanup should catch up once after a system was powered off during its scheduled run. It does not perform the specific action required here: Apply /etc/at.allow with an explicit list of authorized users where available.
D:Add an entry including the username field between the five time fields and the command. That operation is designed for the different case: An administrator must place a centrally managed cron job in /etc/crontab and specify the account that runs it. It does not perform the specific action required here: Apply /etc/at.allow with an explicit list of authorized users where available.
Question 242
The engineer proposes this implementation: Apply /etc/at.allow with an explicit list of authorized users where available. The requirement is: A batch team must deny certain users one-time at scheduling while allowing designated operators. Which technical explanation best supports the proposed action?
- A systemd timer schedules activation of its service unit; simply enabling the service does not set a recurring schedule.
- at.allow takes precedence as an allowlist when present; at.deny serves a different default policy role.
- An enabled systemd unit can start once at a particular boot stage with explicit ordering and dependencies.
- Cron fields specify minute hour day-of-month month day-of-week; user crontabs execute as their owner.
Explanation
Correct Answer
B:at.allow takes precedence as an allowlist when present; at.deny serves a different default policy role. It specifically supports the proposed action of Apply /etc/at.allow with an explicit list of authorized users where available. for the requirement described.
Incorrect Answers
A:This explains another Linux operation, namely Create a .timer unit with an OnCalendar expression and a matching .service unit, then enable/start the timer., where A systemd timer schedules activation of its service unit; simply enabling the service does not set a recurring schedule. It does not explain why Apply /etc/at.allow with an explicit list of authorized users where available. satisfies the stated condition.
C:This explains another Linux operation, namely Use a dedicated systemd service with appropriate dependencies and enable it for the desired boot target., where An enabled systemd unit can start once at a particular boot stage with explicit ordering and dependencies. It does not explain why Apply /etc/at.allow with an explicit list of authorized users where available. satisfies the stated condition.
D:This explains another Linux operation, namely Install a user crontab entry 30 2 * * * /path/housekeeping through crontab -e., where Cron fields specify minute hour day-of-month month day-of-week; user crontabs execute as their owner. It does not explain why Apply /etc/at.allow with an explicit list of authorized users where available. satisfies the stated condition.
Question 243
The action Apply /etc/at.allow with an explicit list of authorized users where available. was applied for this goal: A batch team must deny certain users one-time at scheduling while allowing designated operators. Which observation provides the most direct acceptance evidence?
- atq lists the queued task and it disappears after its single execution.
- The approved account can run crontab -e and an unlisted test account remains denied.
- An authorized operator submits an at job while a nonlisted account is rejected.
- The target timer appears with the expected next and previous trigger information.
Explanation
Correct Answer
C:An authorized operator submits an at job while a nonlisted account is rejected. This checks the effect of Apply /etc/at.allow with an explicit list of authorized users where available. against the stated operational goal.
Incorrect Answers
A:That observation checks A maintenance task should execute only once at 15:00 tomorrow rather than repeat daily. In this scenario it does not demonstrate Apply /etc/at.allow with an explicit list of authorized users where available.; the relevant evidence must establish An authorized operator submits an at job while a nonlisted account is rejected.
B:That observation checks A standard user must be permitted to create crontab jobs when a cron.allow policy is in effect. In this scenario it does not demonstrate Apply /etc/at.allow with an explicit list of authorized users where available.; the relevant evidence must establish An authorized operator submits an at job while a nonlisted account is rejected.
D:That observation checks An administrator wants to know the next activation time and last run of all systemd timers. In this scenario it does not demonstrate Apply /etc/at.allow with an explicit list of authorized users where available.; the relevant evidence must establish An authorized operator submits an at job while a nonlisted account is rejected.
Question 244
A team is validating its implementation of this requirement: A batch team must deny certain users one-time at scheduling while allowing designated operators. Which observed mistake most specifically identifies that the intended automate system administration tasks by scheduling jobs behavior has NOT been met?
- Looking at systemctl list-units for services alone omits timer schedule data.
- The user field was omitted, causing the cron line to be parsed incorrectly.
- The timer skips every missed run after a power outage despite a catch-up requirement.
- The team edited at.deny but a restrictive at.allow still controls access.
Explanation
Correct Answer
D:The team edited at.deny but a restrictive at.allow still controls access. This shows the requested behavior is absent, so the deployment needs the correction: Maintain the relevant allowlist and verify scheduling under both user identities.
Incorrect Answers
A:That symptom concerns An administrator wants to know the next activation time and last run of all systemd timers. This concerns a separate requirement, not the one being tested. The relevant failure is The team edited at.deny but a restrictive at.allow still controls access. The current requirement calls for a different check.
B:That symptom concerns An administrator must place a centrally managed cron job in /etc/crontab and specify the account that runs it. This concerns a separate requirement, not the one being tested. The relevant failure is The team edited at.deny but a restrictive at.allow still controls access. The current requirement calls for a different check.
C:That symptom concerns A periodic cleanup should catch up once after a system was powered off during its scheduled run. This concerns a separate requirement, not the one being tested. The relevant failure is The team edited at.deny but a restrictive at.allow still controls access. The current requirement calls for a different check.
Question 245
During validation, this problem was found: The team edited at.deny but a restrictive at.allow still controls access. The original goal was: A batch team must deny certain users one-time at scheduling while allowing designated operators. Which targeted correction best resolves it?
- Maintain the relevant allowlist and verify scheduling under both user identities.
- Edit the active cron.allow allowlist instead of relying on cron.deny when cron.allow exists.
- Enable and start the .timer unit with a valid calendar trigger and service association.
- Set the cron minute and hour fields precisely and validate the resulting job schedule.
Explanation
Correct Answer
A:Maintain the relevant allowlist and verify scheduling under both user identities. It directly addresses the observed symptom: The team edited at.deny but a restrictive at.allow still controls access. The relevant mechanism is at.allow takes precedence as an allowlist when present; at.deny serves a different default policy role.
Incorrect Answers
B:This fix is aimed at The admin added the name to cron.deny but the allow file still excludes it. and would be relevant if A standard user must be permitted to create crontab jobs when a cron.allow policy is in effect. The incident instead states The team edited at.deny but a restrictive at.allow still controls access. and needs Maintain the relevant allowlist and verify scheduling under both user identities.
C:This fix is aimed at Only the .service unit is enabled, and no timer event invokes it automatically. and would be relevant if A systemd-managed job must run every fifteen minutes with service activation separate from scheduling. The incident instead states The team edited at.deny but a restrictive at.allow still controls access. and needs Maintain the relevant allowlist and verify scheduling under both user identities.
D:This fix is aimed at The script runs every hour because the hour field was a wildcard. and would be relevant if A server must run a housekeeping command at 02:30 every morning under a specific user's identity. The incident instead states The team edited at.deny but a restrictive at.allow still controls access. and needs Maintain the relevant allowlist and verify scheduling under both user identities.
Question 246
A Linux administrator faces this requirement: A service script must produce consistent English diagnostics independent of the caller's native locale. Which specific action is the best direct solution?
- Set LC_TIME=fr_FR.UTF-8 for the session while keeping LC_MESSAGES configured for English.
- Run the command with LC_ALL=C for that invocation.
- List valid identifiers using timedatectl list-timezones.
- Run iconv -f ISO-8859-1 -t UTF-8 input.txt > output.txt.
Explanation
Correct Answer
B:Run the command with LC_ALL=C for that invocation. The mechanism is: LC_ALL overrides category-specific locale settings and yields the C locale's predictable messages and sorting.
Incorrect Answers
A:Set LC_TIME=fr_FR.UTF-8 for the session while keeping LC_MESSAGES configured for English. That operation is designed for the different case: A user wants only date/time formatting in French while retaining English diagnostic messages. It does not perform the specific action required here: Run the command with LC_ALL=C for that invocation.
C:List valid identifiers using timedatectl list-timezones. That operation is designed for the different case: An administrator needs to inspect zoneinfo choices before changing a production system timezone. It does not perform the specific action required here: Run the command with LC_ALL=C for that invocation.
D:Run iconv -f ISO-8859-1 -t UTF-8 input.txt > output.txt. That operation is designed for the different case: A script must convert a legacy ISO-8859-1 text file into UTF-8 without changing its decoded characters. It does not perform the specific action required here: Run the command with LC_ALL=C for that invocation.
Question 247
The engineer proposes this implementation: Run the command with LC_ALL=C for that invocation. The requirement is: A service script must produce consistent English diagnostics independent of the caller's native locale. Which technical explanation best supports the proposed action?
- iconv converts character encodings while preserving representable Unicode characters rather than changing only locale metadata.
- Locale category overrides allow date formatting to change independently of message language when the locale is installed.
- LC_ALL overrides category-specific locale settings and yields the C locale's predictable messages and sorting.
- UTF-8 uses variable-width sequences for non-ASCII characters; a byte-oriented ASCII-only assumption breaks Unicode text.
Explanation
Correct Answer
C:LC_ALL overrides category-specific locale settings and yields the C locale's predictable messages and sorting. It specifically supports the proposed action of Run the command with LC_ALL=C for that invocation. for the requirement described.
Incorrect Answers
A:This explains another Linux operation, namely Run iconv -f ISO-8859-1 -t UTF-8 input.txt > output.txt., where iconv converts character encodings while preserving representable Unicode characters rather than changing only locale metadata. It does not explain why Run the command with LC_ALL=C for that invocation. satisfies the stated condition.
B:This explains another Linux operation, namely Set LC_TIME=fr_FR.UTF-8 for the session while keeping LC_MESSAGES configured for English., where Locale category overrides allow date formatting to change independently of message language when the locale is installed. It does not explain why Run the command with LC_ALL=C for that invocation. satisfies the stated condition.
D:This explains another Linux operation, namely Use a UTF-8-aware locale and appropriate validation/transcoding rather than treating UTF-8 as single-byte ASCII., where UTF-8 uses variable-width sequences for non-ASCII characters; a byte-oriented ASCII-only assumption breaks Unicode text. It does not explain why Run the command with LC_ALL=C for that invocation. satisfies the stated condition.
Question 248
The action Run the command with LC_ALL=C for that invocation. was applied for this goal: A service script must produce consistent English diagnostics independent of the caller's native locale. Which observation provides the most direct acceptance evidence?
- The output is valid UTF-8 and accented characters display correctly when decoded.
- The intended Region/City identifier is listed and accepted by timedatectl set-timezone.
- timedatectl reports the intended zone and date displays the expected UTC offset in that season.
- The command's diagnostics and collation remain stable across users with different LANG values.
Explanation
Correct Answer
D:The command's diagnostics and collation remain stable across users with different LANG values. This checks the effect of Run the command with LC_ALL=C for that invocation. against the stated operational goal.
Incorrect Answers
A:That observation checks A script must convert a legacy ISO-8859-1 text file into UTF-8 without changing its decoded characters. In this scenario it does not demonstrate Run the command with LC_ALL=C for that invocation.; the relevant evidence must establish The command's diagnostics and collation remain stable across users with different LANG values.
B:That observation checks An administrator needs to inspect zoneinfo choices before changing a production system timezone. In this scenario it does not demonstrate Run the command with LC_ALL=C for that invocation.; the relevant evidence must establish The command's diagnostics and collation remain stable across users with different LANG values.
C:That observation checks A workstation needs a permanent geographic timezone set without manually copying raw TZ data. In this scenario it does not demonstrate Run the command with LC_ALL=C for that invocation.; the relevant evidence must establish The command's diagnostics and collation remain stable across users with different LANG values.
Question 249
A team is validating its implementation of this requirement: A service script must produce consistent English diagnostics independent of the caller's native locale. Which observed mistake most specifically identifies that the intended localisation and internationalisation behavior has NOT been met?
- LANG was changed while LC_ALL remained set to a different locale, so output did not change.
- Renaming the file or changing LANG does not transcode the input bytes.
- The script slices a UTF-8 character in the middle of a multibyte sequence and corrupts it.
- The system rejects an ambiguous shorthand that is not a valid installed identifier.
Explanation
Correct Answer
A:LANG was changed while LC_ALL remained set to a different locale, so output did not change. This shows the requested behavior is absent, so the deployment needs the correction: Set the command-scoped LC_ALL variable explicitly instead of only LANG.
Incorrect Answers
B:That symptom concerns A script must convert a legacy ISO-8859-1 text file into UTF-8 without changing its decoded characters. This concerns a separate requirement, not the one being tested. The relevant failure is LANG was changed while LC_ALL remained set to a different locale, so output did not change. The current requirement calls for a different check.
C:That symptom concerns A legacy script hardcodes ASCII assumptions but receives UTF-8 names; the admin needs to identify non-ASCII bytes safely. This concerns a separate requirement, not the one being tested. The relevant failure is LANG was changed while LC_ALL remained set to a different locale, so output did not change. The current requirement calls for a different check.
D:That symptom concerns An administrator needs to inspect zoneinfo choices before changing a production system timezone. This concerns a separate requirement, not the one being tested. The relevant failure is LANG was changed while LC_ALL remained set to a different locale, so output did not change. The current requirement calls for a different check.
Question 250
During validation, this problem was found: LANG was changed while LC_ALL remained set to a different locale, so output did not change. The original goal was: A service script must produce consistent English diagnostics independent of the caller's native locale. Which targeted correction best resolves it?
- Inspect locale and remove or correct conflicting category overrides.
- Set the command-scoped LC_ALL variable explicitly instead of only LANG.
- Choose an installed region/city timezone from the list and apply it explicitly.
- Use locale-aware text processing and proper encoding conversions, not byte truncation.
Explanation
Correct Answer
B:Set the command-scoped LC_ALL variable explicitly instead of only LANG. It directly addresses the observed symptom: LANG was changed while LC_ALL remained set to a different locale, so output did not change. The relevant mechanism is LC_ALL overrides category-specific locale settings and yields the C locale's predictable messages and sorting.
Incorrect Answers
A:This fix is aimed at The user assumes LANG alone determines all categories despite an LC_NUMERIC override. and would be relevant if A user needs to know exactly which locale is active for character classification, messages and numeric formatting. The incident instead states LANG was changed while LC_ALL remained set to a different locale, so output did not change. and needs Set the command-scoped LC_ALL variable explicitly instead of only LANG.
C:This fix is aimed at The system rejects an ambiguous shorthand that is not a valid installed identifier. and would be relevant if An administrator needs to inspect zoneinfo choices before changing a production system timezone. The incident instead states LANG was changed while LC_ALL remained set to a different locale, so output did not change. and needs Set the command-scoped LC_ALL variable explicitly instead of only LANG.
D:This fix is aimed at The script slices a UTF-8 character in the middle of a multibyte sequence and corrupts it. and would be relevant if A legacy script hardcodes ASCII assumptions but receives UTF-8 names; the admin needs to identify non-ASCII bytes safely. The incident instead states LANG was changed while LC_ALL remained set to a different locale, so output did not change. and needs Set the command-scoped LC_ALL variable explicitly instead of only LANG.
LPI Level 1 (102-500) Practice Tests