LPI 102-500 Practice Test 24
Question 230
While verifying a Linux change request, an engineer finds: A nightly job relies on an interactive Bash alias and a GUI environment variable, so scheduled execution cannot find its command. Which TWO complementary steps provide the best corrective action and its most direct diagnostic verification? Select TWO answers.
- Provide explicit executable paths and required environment variables in the crontab or wrapper, avoiding assumptions about interactive startup files.
- Configure the system timezone with `timedatectl set-timezone` or supported zoneinfo linkage and use TZ for deliberate per-process overrides.
- Inspect getent passwd for the account, stat the home directory and review useradd defaults, ownership and login shell.
- Log the job's environment and standard error, inspect effective PATH and the scheduler's recorded command, and run in a clean environment.
- Assume cron automatically sources every user's interactive ~/.bashrc and inherits the login terminal's exported desktop variables.
Explanation
Correct Answers
A:Recommended administrative action: Provide explicit executable paths and required environment variables in the crontab or wrapper, avoiding assumptions about interactive startup files. Linux principle: Cron typically supplies a minimal noninteractive execution environment; user profile aliases and shell search paths are not assured.
D:Most direct verification evidence: Log the job's environment and standard error, inspect effective PATH and the scheduler's recorded command, and run in a clean environment. Linux principle: Cron typically supplies a minimal noninteractive execution environment; user profile aliases and shell search paths are not assured.
Incorrect Answers
B:That option would configure the system timezone with `timedatectl set-timezone` or supported zoneinfo linkage and use TZ for deliberate per-process overrides, but it addresses a different concern. Cron typically supplies a minimal noninteractive execution environment; user profile aliases and shell search paths are not assured.
C:That option would inspect getent passwd for the account, stat the home directory and review useradd defaults, ownership and login shell, but it addresses a different concern. Cron typically supplies a minimal noninteractive execution environment; user profile aliases and shell search paths are not assured.
E:This shortcut is unsafe for the present Linux issue: Assume cron automatically sources every user's interactive ~/.bashrc and inherits the login terminal's exported desktop variables. Cron typically supplies a minimal noninteractive execution environment; user profile aliases and shell search paths are not assured.
Question 231
A Linux administrator investigates the following system incident: A maintenance window requires one job at 03:00 tomorrow, but a technician adds an every-day cron entry and forgets to remove it. Which administrative step is the MOST appropriate way to resolve this issue? Select ONE best answer.
- Use a daily cron schedule for a one-off change and expect cron to automatically erase it after its first execution.
- Submit the one-off command with `at`, inspect scheduled items using `atq`, and remove an unwanted job using `atrm`.
- Use `usermod -aG` to append supplementary group membership and distinguish that operation from `usermod -g` for a primary group.
- 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
B:Recommended administrative action: Submit the one-off command with `at`, inspect scheduled items using `atq`, and remove an unwanted job using `atrm`. The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID.
Incorrect Answers
A:That option would use a daily cron schedule for a one-off change and expect cron to automatically erase it after its first execution, but it addresses a different concern. The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID.
C:That option would use `usermod -aG` to append supplementary group membership and distinguish that operation from `usermod -g` for a primary group, but it addresses a different concern. The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID.
D:That option would apply the appropriate account lock or expiration, disable alternate authentication paths when needed, then remove the user and files only under approved retention policy, but it addresses a different concern. The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID.
Question 232
On a production Linux workstation or server, a technician observes: A maintenance window requires one job at 03:00 tomorrow, but a technician adds an every-day cron entry and forgets to remove it. Which Linux behavior or technical principle BEST explains why the issue occurs? Select ONE best answer.
- Cron typically supplies a minimal noninteractive execution environment; user profile aliases and shell search paths are not assured.
- The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID.
- Nonhuman service identities reduce the blast radius of background processes; human interactive login and unrestricted privilege are not prerequisites for a daemon.
- Use a daily cron schedule for a one-off change and expect cron to automatically erase it after its first execution.
Explanation
Correct Answer
B:Relevant Linux operating principle: The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID.
Incorrect Answers
A:This alternative addresses Cron execution environment and absolute paths, not the specific issue of One-time at jobs and queue management: Cron typically supplies a minimal noninteractive execution environment; user profile aliases and shell search paths are not assured. Linux principle: The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID. Appropriate response: Submit the one-off command with `at`, inspect scheduled items using `atq`, and remove an unwanted job using `atrm`. Root-cause evidence: Inspect the at queue and service status, verify the planned timestamp and run a safe one-time test. Independent acceptance: The command runs exactly once at the intended window or the revoked queue item no longer exists.
C:This alternative addresses System service accounts and least privilege, not the specific issue of One-time at jobs and queue management: Nonhuman service identities reduce the blast radius of background processes; human interactive login and unrestricted privilege are not prerequisites for a daemon. Linux principle: The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID. Appropriate response: Submit the one-off command with `at`, inspect scheduled items using `atq`, and remove an unwanted job using `atrm`. Root-cause evidence: Inspect the at queue and service status, verify the planned timestamp and run a safe one-time test. Independent acceptance: The command runs exactly once at the intended window or the revoked queue item no longer exists.
D:This shortcut is unsafe for the present Linux issue: Use a daily cron schedule for a one-off change and expect cron to automatically erase it after its first execution. The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID.
Question 233
During an LPIC-1 practice lab, the operator encounters this condition: A maintenance window requires one job at 03:00 tomorrow, but a technician adds an every-day cron entry and forgets to remove it. Which evidence or command result MOST directly tests the suspected root cause? Select ONE best answer.
- Use a daily cron schedule for a one-off change and expect cron to automatically erase it after its first execution.
- Inspect the at queue and service status, verify the planned timestamp and run a safe one-time test.
- Compare `id` and getent group output before and after changes and test a fresh login for access to both old and new groups.
- Compare `getent passwd username`, `getent group groupname`, `id` and the nsswitch database configuration, checking authoritative sources.
Explanation
Correct Answer
B:Most direct verification evidence: Inspect the at queue and service status, verify the planned timestamp and run a safe one-time test. The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID.
Incorrect Answers
A:This shortcut is unsafe for the present Linux issue: Use a daily cron schedule for a one-off change and expect cron to automatically erase it after its first execution. The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID.
C: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. The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID.
D: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. The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID.
Question 234
A helpdesk escalation describes this Linux behavior: A maintenance window requires one job at 03:00 tomorrow, but a technician adds an every-day cron entry and forgets to remove it. Which observed outcome BEST confirms a successful and properly scoped correction? Select ONE best answer.
- Automation produces stable expected output while interactive users retain their required localization where supported.
- Use a daily cron schedule for a one-off change and expect cron to automatically erase it after its first execution.
- The service starts with only the required effective permissions and the identity cannot be used for ordinary unauthorized interactive login.
- The command runs exactly once at the intended window or the revoked queue item no longer exists.
Explanation
Correct Answer
D:Observable acceptance criterion: The command runs exactly once at the intended window or the revoked queue item no longer exists. The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID.
Incorrect Answers
A:This alternative addresses Locale category precedence and stable parsing, not the specific issue of One-time at jobs and queue management: Automation produces stable expected output while interactive users retain their required localization where supported.
B:This shortcut is unsafe for the present Linux issue: Use a daily cron schedule for a one-off change and expect cron to automatically erase it after its first execution. It cannot establish a safe correction. Linux principle: The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID.
C:This alternative addresses System service accounts and least privilege, not the specific issue of One-time at jobs and queue management: The service starts with only the required effective permissions and the identity cannot be used for ordinary unauthorized interactive login. Linux principle: The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID. Appropriate response: Submit the one-off command with `at`, inspect scheduled items using `atq`, and remove an unwanted job using `atrm`. Root-cause evidence: Inspect the at queue and service status, verify the planned timestamp and run a safe one-time test. Independent acceptance: The command runs exactly once at the intended window or the revoked queue item no longer exists.
Question 235
An operations handoff identifies this problem: A maintenance window requires one job at 03:00 tomorrow, but a technician adds an every-day cron entry and forgets to remove it. Which misleading assumption MOST directly contributes to this failure and should be rejected? Select ONE best answer.
- Use `usermod -G newgroup` without `-a` and assume it appends the group while retaining all previous memberships.
- Assume cron.allow and at.allow are interchangeable and that denying one scheduler necessarily blocks access to the other.
- Assume every Linux user must appear literally in /etc/passwd and that grepping a local file is equivalent to a Name Service Switch lookup.
- Use a daily cron schedule for a one-off change and expect cron to automatically erase it after its first execution.
Explanation
Correct Answer
D:Reject this specific misconception: Use a daily cron schedule for a one-off change and expect cron to automatically erase it after its first execution. It incorrectly assumes behavior that conflicts with the observed Linux conditions.
Incorrect Answers
A:That option would use `usermod -G newgroup` without `-a` and assume it appends the group while retaining all previous memberships, but it addresses a different concern. The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID.
B:That option would assume cron.allow and at.allow are interchangeable and that denying one scheduler necessarily blocks access to the other, but it addresses a different concern. The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID.
C:That option would assume every Linux user must appear literally in /etc/passwd and that grepping a local file is equivalent to a Name Service Switch lookup, but it addresses a different concern. The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID.
Question 236
A team maintaining a Linux host reports: An engineer queues a one-time batch command and later cannot identify or cancel it before the change window closes. Which administrative step is the MOST appropriate way to resolve this issue? Select ONE best answer.
- Use passwd and chage to update password or aging policy through supported account tools, preserving restricted shadow-file access.
- Use a daily cron schedule for a one-off change and expect cron to automatically erase it after its first execution.
- Choose the appropriate LANG and LC_* settings and use LC_ALL=C only where a predictable locale-independent parsing environment is needed.
- Submit the one-off command with `at`, inspect scheduled items using `atq`, and remove an unwanted job using `atrm`.
Explanation
Correct Answer
D:Recommended administrative action: Submit the one-off command with `at`, inspect scheduled items using `atq`, and remove an unwanted job using `atrm`.
Incorrect Answers
A: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. The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID.
B:This shortcut is unsafe for the present Linux issue: Use a daily cron schedule for a one-off change and expect cron to automatically erase it after its first execution. It cannot establish a safe correction.
C:That option would choose the appropriate LANG and LC_* settings and use LC_ALL=C only where a predictable locale-independent parsing environment is needed, but it addresses a different concern. The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID.
Question 237
While verifying a Linux change request, an engineer finds: An engineer queues a one-time batch command and later cannot identify or cancel it before the change window closes. Which Linux behavior or technical principle BEST explains why the issue occurs? Select ONE best answer.
- The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID.
- Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts.
- Use a daily cron schedule for a one-off change and expect cron to automatically erase it after its first execution.
- Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships.
Explanation
Correct Answer
A:Relevant Linux operating principle: The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID.
Incorrect Answers
B:This alternative addresses Name service lookups and account database integrity, not the specific issue of One-time at jobs and queue management: Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts. Linux principle: The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID. Appropriate response: Submit the one-off command with `at`, inspect scheduled items using `atq`, and remove an unwanted job using `atrm`. Root-cause evidence: Inspect the at queue and service status, verify the planned timestamp and run a safe one-time test. Independent acceptance: The command runs exactly once at the intended window or the revoked queue item no longer exists.
C:This shortcut is unsafe for the present Linux issue: Use a daily cron schedule for a one-off change and expect cron to automatically erase it after its first execution. It cannot establish a safe correction. Linux principle: The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID.
D:This alternative addresses Supplementary group membership and primary GID, not the specific issue of One-time at jobs and queue management: Primary GID and supplementary groups serve distinct access and ownership roles; setting a replacement `-G` list without `-a` removes omitted supplementary memberships. Linux principle: The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID. Appropriate response: Submit the one-off command with `at`, inspect scheduled items using `atq`, and remove an unwanted job using `atrm`. Root-cause evidence: Inspect the at queue and service status, verify the planned timestamp and run a safe one-time test. Independent acceptance: The command runs exactly once at the intended window or the revoked queue item no longer exists.
Question 238
A Linux administrator investigates the following system incident: An engineer queues a one-time batch command and later cannot identify or cancel it before the change window closes. Which evidence or command result MOST directly tests the suspected root cause? Select ONE best answer.
- Inspect getent passwd for the account, stat the home directory and review useradd defaults, ownership and login shell.
- Inspect the at queue and service status, verify the planned timestamp and run a safe one-time test.
- Inspect the actual allow and deny files, check mode and ownership, and attempt harmless submissions as an allowed and a denied test account.
- Use a daily cron schedule for a one-off change and expect cron to automatically erase it after its first execution.
Explanation
Correct Answer
B:Most direct verification evidence: Inspect the at queue and service status, verify the planned timestamp and run a safe one-time test.
Incorrect Answers
A:That option would inspect getent passwd for the account, stat the home directory and review useradd defaults, ownership and login shell, but it addresses a different concern. The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID.
C: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. The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID.
D:This shortcut is unsafe for the present Linux issue: Use a daily cron schedule for a one-off change and expect cron to automatically erase it after its first execution. It cannot establish a safe correction. Linux principle: The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID. Appropriate response: Submit the one-off command with `at`, inspect scheduled items using `atq`, and remove an unwanted job using `atrm`. Root-cause evidence: Inspect the at queue and service status, verify the planned timestamp and run a safe one-time test. Independent acceptance: The command runs exactly once at the intended window or the revoked queue item no longer exists.
Question 239
On a production Linux workstation or server, a technician observes: An engineer queues a one-time batch command and later cannot identify or cancel it before the change window closes. Which observed outcome BEST confirms a successful and properly scoped correction? Select ONE best answer.
- Use a daily cron schedule for a one-off change and expect cron to automatically erase it after its first execution.
- Automation produces stable expected output while interactive users retain their required localization where supported.
- The new principal resolves correctly and has an accessible correctly owned home and intended login environment.
- The command runs exactly once at the intended window or the revoked queue item no longer exists.
Explanation
Correct Answer
D:Observable acceptance criterion: The command runs exactly once at the intended window or the revoked queue item no longer exists.
Incorrect Answers
A:This shortcut is unsafe for the present Linux issue: Use a daily cron schedule for a one-off change and expect cron to automatically erase it after its first execution. The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID.
B:This alternative addresses Locale category precedence and stable parsing, not the specific issue of One-time at jobs and queue management: Automation produces stable expected output while interactive users retain their required localization where supported.
C:This alternative addresses Creating users and provisioning home directories, not the specific issue of One-time at jobs and queue management: The new principal resolves correctly and has an accessible correctly owned home and intended login environment. Linux principle: The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID. Appropriate response: Submit the one-off command with `at`, inspect scheduled items using `atq`, and remove an unwanted job using `atrm`. Root-cause evidence: Inspect the at queue and service status, verify the planned timestamp and run a safe one-time test. Independent acceptance: The command runs exactly once at the intended window or the revoked queue item no longer exists.
Question 240
During an LPIC-1 practice lab, the operator encounters this condition: An engineer queues a one-time batch command and later cannot identify or cancel it before the change window closes. Which TWO complementary steps provide the best corrective action and its most direct diagnostic verification? Select TWO answers.
- Inspect the at queue and service status, verify the planned timestamp and run a safe one-time test.
- Submit the one-off command with `at`, inspect scheduled items using `atq`, and remove an unwanted job using `atrm`.
- Inspect account UID and shell, service unit User setting, writable paths, group membership and whether interactive authentication is possible.
- Review and apply the appropriate /etc/cron.allow and /etc/at.allow or deny policies with the scheduler's supported access rules.
- Use a daily cron schedule for a one-off change and expect cron to automatically erase it after its first execution.
Explanation
Correct Answers
A:Most direct verification evidence: Inspect the at queue and service status, verify the planned timestamp and run a safe one-time test. Linux principle: The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID.
B:Recommended administrative action: Submit the one-off command with `at`, inspect scheduled items using `atq`, and remove an unwanted job using `atrm`. Linux principle: The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID.
Incorrect Answers
C: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. The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID.
D: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. The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID.
E:This shortcut is unsafe for the present Linux issue: Use a daily cron schedule for a one-off change and expect cron to automatically erase it after its first execution. The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID.