LPI 102-500 Practice Test 21
Question 200
An operations handoff identifies this problem: A backup application has no human operator, but its account is created with standard interactive login defaults and shared credentials. Which THREE elements together give the appropriate corrective action, direct diagnostic evidence and observable acceptance result? Select THREE answers.
- The service starts with only the required effective permissions and the identity cannot be used for ordinary unauthorized interactive login.
- Give every daemon root-level sudo and a shared interactive password because background processes cannot run under a restricted system account.
- Configure the system timezone with `timedatectl set-timezone` or supported zoneinfo linkage and use TZ for deliberate per-process overrides.
- 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.
- Inspect account UID and shell, service unit User setting, writable paths, group membership and whether interactive authentication is possible.
- Compare `getent passwd username`, `getent group groupname`, `id` and the nsswitch database configuration, checking authoritative sources.
Explanation
Correct Answers
A:Observable acceptance criterion: The service starts with only the required effective permissions and the identity cannot be used for ordinary unauthorized interactive login. Linux principle: Nonhuman service identities reduce the blast radius of background processes; human interactive login and unrestricted privilege are not prerequisites for a daemon.
D:Recommended administrative action: 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. Linux principle: Nonhuman service identities reduce the blast radius of background processes; human interactive login and unrestricted privilege are not prerequisites for a daemon.
E:Most direct verification evidence: Inspect account UID and shell, service unit User setting, writable paths, group membership and whether interactive authentication is possible. Linux principle: Nonhuman service identities reduce the blast radius of background processes; human interactive login and unrestricted privilege are not prerequisites for a daemon.
Incorrect Answers
B:This shortcut is unsafe for the present Linux issue: Give every daemon root-level sudo and a shared interactive password because background processes cannot run under a restricted system account. Nonhuman service identities reduce the blast radius of background processes; human interactive login and unrestricted privilege are not prerequisites for a daemon.
C: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. Nonhuman service identities reduce the blast radius of background processes; human interactive login and unrestricted privilege are not prerequisites for a daemon.
F: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. Nonhuman service identities reduce the blast radius of background processes; human interactive login and unrestricted privilege are not prerequisites for a daemon.
Question 201
A team maintaining a Linux host reports: A shell script greps only /etc/passwd for a domain-backed account and wrongly reports it missing even though `id` resolves it. Which administrative step is the MOST appropriate way to resolve this issue? Select ONE best answer.
- Review and apply the appropriate /etc/cron.allow and /etc/at.allow or deny policies with the scheduler's supported access rules.
- Use `getent` and supported user or group administration tools to inspect the effective NSS account database without assuming all identities exist in local 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.
- Assume every Linux user must appear literally in /etc/passwd and that grepping a local file is equivalent to a Name Service Switch lookup.
Explanation
Correct Answer
B:Recommended administrative action: Use `getent` and supported user or group administration tools to inspect the effective NSS account database without assuming all identities exist in local files.
Incorrect Answers
A: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. Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts.
C:This alternative addresses Systemd timers and persistent missed schedules, not the specific issue of Name service lookups and account database integrity: 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: Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts. Appropriate response: Use `getent` and supported user or group administration tools to inspect the effective NSS account database without assuming all identities exist in local files. Root-cause evidence: Compare `getent passwd username`, `getent group groupname`, `id` and the nsswitch database configuration, checking authoritative sources. Independent acceptance: The correct user or group is resolved consistently by standard system libraries, with no accidental duplicate identities.
D: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. Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts.
Question 202
While verifying a Linux change request, an engineer finds: A shell script greps only /etc/passwd for a domain-backed account and wrongly reports it missing even though `id` resolves it. Which Linux behavior or technical principle BEST explains why the issue occurs? Select ONE best answer.
- cron and at can enforce distinct user-access controls, and the presence of an allow file often changes who may submit jobs.
- Assume every Linux user must appear literally in /etc/passwd and that grepping a local file is equivalent to a Name Service Switch lookup.
- Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts.
- Locale category variables can override LANG for specific behaviors; LC_ALL overrides category settings, affecting messages, sorting and number formats.
Explanation
Correct Answer
C:Relevant Linux operating principle: Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts.
Incorrect Answers
A:This alternative addresses Cron and at user-access allow deny policies, not the specific issue of Name service lookups and account database integrity: cron and at can enforce distinct user-access controls, and the presence of an allow file often changes who may submit jobs. Linux principle: Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts. Appropriate response: Use `getent` and supported user or group administration tools to inspect the effective NSS account database without assuming all identities exist in local files. Root-cause evidence: Compare `getent passwd username`, `getent group groupname`, `id` and the nsswitch database configuration, checking authoritative sources. Independent acceptance: The correct user or group is resolved consistently by standard system libraries, with no accidental duplicate identities.
B: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. Appropriate response: Use `getent` and supported user or group administration tools to inspect the effective NSS account database without assuming all identities exist in local files.
D:This alternative addresses Locale category precedence and stable parsing, not the specific issue of Name service lookups and account database integrity: Locale category variables can override LANG for specific behaviors; LC_ALL overrides category settings, affecting messages, sorting and number formats. Linux principle: Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts. Appropriate response: Use `getent` and supported user or group administration tools to inspect the effective NSS account database without assuming all identities exist in local files. Root-cause evidence: Compare `getent passwd username`, `getent group groupname`, `id` and the nsswitch database configuration, checking authoritative sources. Independent acceptance: The correct user or group is resolved consistently by standard system libraries, with no accidental duplicate identities.
Question 203
A Linux administrator investigates the following system incident: A shell script greps only /etc/passwd for a domain-backed account and wrongly reports it missing even though `id` resolves it. Which evidence or command result MOST directly tests the suspected root cause? Select ONE best answer.
- Inspect `getent passwd`, controlled `chage -l` output, shadow permissions and test behavior at the next authorized login.
- Compare `getent passwd username`, `getent group groupname`, `id` and the nsswitch database configuration, checking authoritative sources.
- Assume every Linux user must appear literally in /etc/passwd and that grepping a local file is equivalent to a Name Service Switch lookup.
- Inspect account UID and shell, service unit User setting, writable paths, group membership and whether interactive authentication is possible.
Explanation
Correct Answer
B:Most direct verification evidence: Compare `getent passwd username`, `getent group groupname`, `id` and the nsswitch database configuration, checking authoritative sources.
Incorrect Answers
A:That option would inspect `getent passwd`, controlled `chage -l` output, shadow permissions and test behavior at the next authorized login, but it addresses a different concern. Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts.
C:This shortcut is unsafe for the present Linux issue: Assume every Linux user must appear literally in /etc/passwd and that grepping a local file is equivalent to a Name Service Switch lookup. It cannot establish a safe correction.
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. Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts.
Question 204
On a production Linux workstation or server, a technician observes: A shell script greps only /etc/passwd for a domain-backed account and wrongly reports it missing even though `id` resolves it. Which observed outcome BEST confirms a successful and properly scoped correction? Select ONE best answer.
- The correct user or group is resolved consistently by standard system libraries, with no accidental duplicate identities.
- The service starts with only the required effective permissions and the identity cannot be used for ordinary unauthorized interactive login.
- Assume every Linux user must appear literally in /etc/passwd and that grepping a local file is equivalent to a Name Service Switch lookup.
- Automation produces stable expected output while interactive users retain their required localization where supported.
Explanation
Correct Answer
A:Observable acceptance criterion: The correct user or group is resolved consistently by standard system libraries, with no accidental duplicate identities.
Incorrect Answers
B:This alternative addresses System service accounts and least privilege, not the specific issue of Name service lookups and account database integrity: The service starts with only the required effective permissions and the identity cannot be used for ordinary unauthorized interactive login. Linux principle: Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts. Appropriate response: Use `getent` and supported user or group administration tools to inspect the effective NSS account database without assuming all identities exist in local files. Root-cause evidence: Compare `getent passwd username`, `getent group groupname`, `id` and the nsswitch database configuration, checking authoritative sources. Independent acceptance: The correct user or group is resolved consistently by standard system libraries, with no accidental duplicate identities.
C:This shortcut is unsafe for the present Linux issue: Assume every Linux user must appear literally in /etc/passwd and that grepping a local file is equivalent to a Name Service Switch lookup. Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts.
D:This alternative addresses Locale category precedence and stable parsing, not the specific issue of Name service lookups and account database integrity: Automation produces stable expected output while interactive users retain their required localization where supported. Linux principle: Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts. Appropriate response: Use `getent` and supported user or group administration tools to inspect the effective NSS account database without assuming all identities exist in local files. Root-cause evidence: Compare `getent passwd username`, `getent group groupname`, `id` and the nsswitch database configuration, checking authoritative sources. Independent acceptance: The correct user or group is resolved consistently by standard system libraries, with no accidental duplicate identities.
Question 205
During an LPIC-1 practice lab, the operator encounters this condition: A shell script greps only /etc/passwd for a domain-backed account and wrongly reports it missing even though `id` resolves it. Which misleading assumption MOST directly contributes to this failure and should be rejected? Select ONE best answer.
- Assume every Linux user must appear literally in /etc/passwd and that grepping a local file is equivalent to a Name Service Switch lookup.
- Assume the sixth username column is mandatory in both per-user crontabs and system-wide cron definitions.
- Set the hardware clock to an arbitrary local offset to fix display time and expect a temporary TZ assignment to persist globally.
- Assume LANG always takes priority over LC_ALL and that decimal notation or collation are identical in every locale.
Explanation
Correct Answer
A:Reject this specific misconception: Assume every Linux user must appear literally in /etc/passwd and that grepping a local file is equivalent to a Name Service Switch lookup. It incorrectly assumes behavior that conflicts with the observed Linux conditions.
Incorrect Answers
B: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. Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts.
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. Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts.
D:That option would assume LANG always takes priority over LC_ALL and that decimal notation or collation are identical in every locale, but it addresses a different concern. Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts.
Question 206
A helpdesk escalation describes this Linux behavior: An administrator edits /etc/group directly and creates mismatched group entries while a directory service supplies additional account data. Which administrative step is the MOST appropriate way to resolve this issue? Select ONE best answer.
- 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 distinct appropriately limited service or system account, choose a non-login shell and limit filesystem and group rights to the daemon's needs.
- Use `getent` and supported user or group administration tools to inspect the effective NSS account database without assuming all identities exist in local files.
- Use passwd and chage to update password or aging policy through supported account tools, preserving restricted shadow-file access.
Explanation
Correct Answer
C:Recommended administrative action: Use `getent` and supported user or group administration tools to inspect the effective NSS account database without assuming all identities exist in local files.
Incorrect Answers
A:This shortcut is unsafe for the present Linux issue: Assume every Linux user must appear literally in /etc/passwd and that grepping a local file is equivalent to a Name Service Switch lookup. It cannot establish a safe correction.
B: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. Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts.
D: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. Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts.
Question 207
An operations handoff identifies this problem: An administrator edits /etc/group directly and creates mismatched group entries while a directory service supplies additional account data. Which Linux behavior or technical principle BEST explains why the issue occurs? Select ONE best answer.
- cron and at can enforce distinct user-access controls, and the presence of an allow file often changes who may submit jobs.
- Assume every Linux user must appear literally in /etc/passwd and that grepping a local file is equivalent to a Name Service Switch lookup.
- 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.
Explanation
Correct Answer
D:Relevant Linux operating principle: Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts.
Incorrect Answers
A:This alternative addresses Cron and at user-access allow deny policies, not the specific issue of Name service lookups and account database integrity: cron and at can enforce distinct user-access controls, and the presence of an allow file often changes who may submit jobs. Linux principle: Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts. Appropriate response: Use `getent` and supported user or group administration tools to inspect the effective NSS account database without assuming all identities exist in local files. Root-cause evidence: Compare `getent passwd username`, `getent group groupname`, `id` and the nsswitch database configuration, checking authoritative sources. Independent acceptance: The correct user or group is resolved consistently by standard system libraries, with no accidental duplicate identities.
B:This shortcut is unsafe for the present Linux issue: Assume every Linux user must appear literally in /etc/passwd and that grepping a local file is equivalent to a Name Service Switch lookup. It cannot establish a safe correction. Linux principle: Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts.
C:This alternative addresses One-time at jobs and queue management, not the specific issue of Name service lookups and account database integrity: The at daemon queues single-run jobs for specified times, while cron describes recurring schedules, and each queue entry has a removable job ID. Linux principle: Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts. Appropriate response: Use `getent` and supported user or group administration tools to inspect the effective NSS account database without assuming all identities exist in local files. Root-cause evidence: Compare `getent passwd username`, `getent group groupname`, `id` and the nsswitch database configuration, checking authoritative sources. Independent acceptance: The correct user or group is resolved consistently by standard system libraries, with no accidental duplicate identities.
Question 208
A team maintaining a Linux host reports: An administrator edits /etc/group directly and creates mismatched group entries while a directory service supplies additional account data. Which evidence or command result MOST directly tests the suspected root cause? Select ONE best answer.
- Assume every Linux user must appear literally in /etc/passwd and that grepping a local file is equivalent to a Name Service Switch lookup.
- Compare `getent passwd username`, `getent group groupname`, `id` and the nsswitch database configuration, checking authoritative sources.
- Inspect the timer unit and `systemctl list-timers`, check last and next triggers, and simulate a missed activation in a test environment.
- Log the job's environment and standard error, inspect effective PATH and the scheduler's recorded command, and run in a clean environment.
Explanation
Correct Answer
B:Most direct verification evidence: Compare `getent passwd username`, `getent group groupname`, `id` and the nsswitch database configuration, checking authoritative sources.
Incorrect Answers
A:This shortcut is unsafe for the present Linux issue: Assume every Linux user must appear literally in /etc/passwd and that grepping a local file is equivalent to a Name Service Switch lookup. It cannot establish a safe correction. Linux principle: Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts. Appropriate response: Use `getent` and supported user or group administration tools to inspect the effective NSS account database without assuming all identities exist in local files. Root-cause evidence: Compare `getent passwd username`, `getent group groupname`, `id` and the nsswitch database configuration, checking authoritative sources. Independent acceptance: The correct user or group is resolved consistently by standard system libraries, with no accidental duplicate identities.
C:That option would inspect the timer unit and `systemctl list-timers`, check last and next triggers, and simulate a missed activation in a test environment, but it addresses a different concern. Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts.
D:That option would log the job's environment and standard error, inspect effective PATH and the scheduler's recorded command, and run in a clean environment, but it addresses a different concern. Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts.
Question 209
While verifying a Linux change request, an engineer finds: An administrator edits /etc/group directly and creates mismatched group entries while a directory service supplies additional account data. Which observed outcome BEST confirms a successful and properly scoped correction? Select ONE best answer.
- Assume every Linux user must appear literally in /etc/passwd and that grepping a local file is equivalent to a Name Service Switch lookup.
- The deactivated account cannot start unauthorized sessions, and retained data is handled according to approved policy.
- The new principal resolves correctly and has an accessible correctly owned home and intended login environment.
- The correct user or group is resolved consistently by standard system libraries, with no accidental duplicate identities.
Explanation
Correct Answer
D:Observable acceptance criterion: The correct user or group is resolved consistently by standard system libraries, with no accidental duplicate identities.
Incorrect Answers
A:This shortcut is unsafe for the present Linux issue: Assume every Linux user must appear literally in /etc/passwd and that grepping a local file is equivalent to a Name Service Switch lookup. Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts.
B:This alternative addresses Account locking suspension and safe removal, not the specific issue of Name service lookups and account database integrity: The deactivated account cannot start unauthorized sessions, and retained data is handled according to approved policy. Linux principle: Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts. Appropriate response: Use `getent` and supported user or group administration tools to inspect the effective NSS account database without assuming all identities exist in local files. Root-cause evidence: Compare `getent passwd username`, `getent group groupname`, `id` and the nsswitch database configuration, checking authoritative sources. Independent acceptance: The correct user or group is resolved consistently by standard system libraries, with no accidental duplicate identities.
C:This alternative addresses Creating users and provisioning home directories, not the specific issue of Name service lookups and account database integrity: The new principal resolves correctly and has an accessible correctly owned home and intended login environment. Linux principle: Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts. Appropriate response: Use `getent` and supported user or group administration tools to inspect the effective NSS account database without assuming all identities exist in local files. Root-cause evidence: Compare `getent passwd username`, `getent group groupname`, `id` and the nsswitch database configuration, checking authoritative sources. Independent acceptance: The correct user or group is resolved consistently by standard system libraries, with no accidental duplicate identities.
Question 210
A Linux administrator investigates the following system incident: An administrator edits /etc/group directly and creates mismatched group entries while a directory service supplies additional account data. Which TWO complementary steps provide the best corrective action and its most direct diagnostic verification? Select TWO answers.
- Create the intended user with a suitable home directory, shell and UID policy using useradd with the needed options, and verify ownership and skeleton-file deployment.
- Compare `getent passwd username`, `getent group groupname`, `id` and the nsswitch database configuration, checking authoritative sources.
- Run `locale`, inspect LANG and LC_* values, compare representative command output under LC_ALL=C, and test number and sort handling.
- Use `getent` and supported user or group administration tools to inspect the effective NSS account database without assuming all identities exist in local files.
- Assume every Linux user must appear literally in /etc/passwd and that grepping a local file is equivalent to a Name Service Switch lookup.
Explanation
Correct Answers
B:Most direct verification evidence: Compare `getent passwd username`, `getent group groupname`, `id` and the nsswitch database configuration, checking authoritative sources. Linux principle: Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts.
D:Recommended administrative action: Use `getent` and supported user or group administration tools to inspect the effective NSS account database without assuming all identities exist in local files. Linux principle: Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts.
Incorrect Answers
A:That option would create the intended user with a suitable home directory, shell and UID policy using useradd with the needed options, and verify ownership and skeleton-file deployment, but it addresses a different concern. Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts.
C:That option would run `locale`, inspect LANG and LC_* values, compare representative command output under LC_ALL=C, and test number and sort handling, but it addresses a different concern. Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts.
E:This shortcut is unsafe for the present Linux issue: Assume every Linux user must appear literally in /etc/passwd and that grepping a local file is equivalent to a Name Service Switch lookup. Name Service Switch may combine local passwd, group and directory sources; local text files do not necessarily describe all recognized accounts.